Windows Touch应用程序疑难解答-中文整理
来源:互联网 发布:xp关闭445端口的方法 编辑:程序博客网 时间:2024/06/06 23:55
应用程序疑难解答
本节提供了针对常见问题的解决方法。
常规疑难解答
#define MOUSEEVENTF_FROMTOUCH 0xFF515700if ((GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) == MOUSEEVENTF_FROMTOUCH) { // Click was generated by wisptis / Windows Touch}else{ // Click was generated by the mouse.}
操作和延时疑难解答
Windows Touch 输入疑难解答
#ifndef WINVER // Specify that the minimum required platform is Windows 7.#define WINVER 0x0601 #endif
POINT ptInput; if (GetTouchInputInfo((HTOUCHINPUT)lParam, cInputs, pInputs, sizeof(TOUCHINPUT))){ for (int i=0; i < static_cast<INT>(cInputs); i++){ TOUCHINPUT ti = pInputs[i]; if (ti.dwID != 0){ // Do something with your touch input handle. ptInput.x = TOUCH_COORD_TO_PIXEL(ti.x); ptInput.y = TOUCH_COORD_TO_PIXEL(ti.y); ScreenToClient(hWnd, &ptInput); points[ti.dwID][0] = ptInput.x; points[ti.dwID][1] = ptInput.y; } } }
注意 若要使用 ScreenToClient 函数,您的应用程序必须支持高 DPI。有关支持高 DPI 的更多信息,请参见 MSDN 的高 DPI(可能为英文网页)部分。
Windows Touch 笔势疑难解答
// The message map.BEGIN_MESSAGE_MAP() ON_WM_CREATE() ... ... ... ON_MESSAGE(WM_GESTURENOTIFY, OnWindowsGestureNotify)END_MESSAGE_MAP() LRESULT CTestWndApp::OnWindowsGestureNotify( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled ){ GESTURECONFIG gc; gc.dwID = GID_ROTATE; // The gesture identifier. gc.dwWant = GC_ROTATE; // The gesture command you are enabling for GID_ROTATE. gc.dwBlock = 0; // Don't block anything. UINT uiGcs = 1; // The number of gestures being set. BOOL bResult = SetGestureConfig(g_hMainWnd, 0, uiGcs, &gc, sizeof(GESTURECONFIG)); if(!bResult) { // Something went wrong, report the error using your preferred logging. } return 0;}
有关典型笔势配置的更多示例,请参见 SetGestureConfig。
- Windows Touch应用程序疑难解答-中文整理
- Windows Touch编程体系结构概述-中文整理
- Windows Touch的WM_GESTURE与WM_GESTURENOTIGY消息-中文整理
- Windows Touch的GESTURECONFIG,GESTUREINFO,GESTURENOTIFYSTRUCT结构体-中文整理
- Windows Touch编程选择使用适当方法-中文整理
- Windows疑难解答
- Windows Touch宏-中文
- 编程指南:应用程序疑难解答
- Windows Installer- MSI 疑难解答
- Windows 更新疑难解答
- Windows SharePoint Services 疑难解答
- Windows Touch 消息入门-中文这个理
- 疑难解答
- Windows局域网共享全攻略(疑难解答)
- Windows Touch
- C/C++ 独立应用程序和并行程序集疑难解答
- C/C++ 独立应用程序和并行程序集疑难解答
- 关于字符编码的各种疑难解答(多方收集整理)
- 11172 - Relational Operator
- proteus元件库对照表
- ollydbg的binary copy、binary paste、binary edit
- Hibernate 继承映射
- 27 个免费的 HTML5/CSS3 模板供下载
- Windows Touch应用程序疑难解答-中文整理
- 心动C++情牵链表
- window xp MinGW下安装gtk+开发
- 让你的PHP更安全之PHP.ini
- 曾经的积极 曾经的向上呢!!!
- 节省你时间的 12 个有用的 HTML5 滑块
- btcTrade_project
- windows开启wifi批处理命令
- POJ 2112 Optimal Milking (二分+最短路+最大流or二分图多重匹配)