取消Win7应用中的模拟右键功能,及其他WIN7触控特效的开关
2013-04-18 14:34
309 查看
简单来说就是系统会通过消息问你要不要接受右键事件,默认不反应就是接受,你可以自己写处理代码表示自己不接受. 那么当你触控按住的时候就不会划圈圈.而且你的"按住不放"这样的事件逻辑可以正常工作了.英文不是问题,大家自己看吧. by TimeLink Technology Co.,LTD
Sent when the system asks a window which system gestures it would like to receive.
Not used.
lParam
A point value that represents the screen coordinates.
Note The lParam can be converted to x-coordinates and y-coordinates by using the GET_X_LPARAM andGET_Y_LPARAM macros.
By default, your window will receive all system gesture events. You can choose which events you would like your window to receive and which events you would like disabled by responding to theWM_TABLET_QUERYSYSTEMGESTURESTATUS message in your WndProc. TheWM_TABLET_QUERYSYSTEMGESTURESTATUS message is defined in tpcshrd.h. The values to enable and disable system tablet system gestures are also defined in tpcshrd.h as follows:
Note
Disabling press and hold will improve responsiveness for mouse clicks because this functionality creates a wait time to distinguish between the two operations.
Use caution when handling the WM_TABLET_QUERYSYSTEMGESTURESTATUS message.WM_TABLET_QUERYSYSTEMGESTURESTATUS is passed using the SendMessageTimeout function. If you call methods on a COM interface, that object must be within the same process. If not, COM throws an exception.
C++
The following example shows how to disable various flicks features for an entire window.
C++
WM_TABLET_QUERYSYSTEMGESTURESTATUS message
Applies to: desktop apps onlySent when the system asks a window which system gestures it would like to receive.
#define WM_TABLET_DEFBASE 0x02C0 #define WM_TABLET_QUERYSYSTEMGESTURESTATUS (WM_TABLET_DEFBASE + 12)
Parameters
wParamNot used.
lParam
A point value that represents the screen coordinates.
Remarks
By handling this message, you can dynamically disable flicks for regions of a window.Note The lParam can be converted to x-coordinates and y-coordinates by using the GET_X_LPARAM andGET_Y_LPARAM macros.
By default, your window will receive all system gesture events. You can choose which events you would like your window to receive and which events you would like disabled by responding to theWM_TABLET_QUERYSYSTEMGESTURESTATUS message in your WndProc. TheWM_TABLET_QUERYSYSTEMGESTURESTATUS message is defined in tpcshrd.h. The values to enable and disable system tablet system gestures are also defined in tpcshrd.h as follows:
#define TABLET_DISABLE_PRESSANDHOLD 0x00000001 #define TABLET_DISABLE_PENTAPFEEDBACK 0x00000008 #define TABLET_DISABLE_PENBARRELFEEDBACK 0x00000010 #define TABLET_DISABLE_TOUCHUIFORCEON 0x00000100 #define TABLET_DISABLE_TOUCHUIFORCEOFF 0x00000200 #define TABLET_DISABLE_TOUCHSWITCH 0x00008000 #define TABLET_DISABLE_FLICKS 0x00010000 #define TABLET_ENABLE_FLICKSONCONTEXT 0x00020000 #define TABLET_ENABLE_FLICKLEARNINGMODE 0x00040000 #define TABLET_DISABLE_SMOOTHSCROLLING 0x00080000 #define TABLET_DISABLE_FLICKFALLBACKKEYS 0x00100000 #define TABLET_ENABLE_MULTITOUCHDATA 0x01000000
Note
Disabling press and hold will improve responsiveness for mouse clicks because this functionality creates a wait time to distinguish between the two operations.
Use caution when handling the WM_TABLET_QUERYSYSTEMGESTURESTATUS message.WM_TABLET_QUERYSYSTEMGESTURESTATUS is passed using the SendMessageTimeout function. If you call methods on a COM interface, that object must be within the same process. If not, COM throws an exception.
Examples
The following example shows how to disable flicks for a region using WM_TABLET_QUERYSYSTEMGESTURESTATUS.C++
#include <windowsx.h> (...) LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam){ case WM_TABLET_QUERYSYSTEMGESTURESTATUS: int x = GET_X_LPARAM(lParam); int y = GET_Y_LPARAM(lParam); if (x < xThreashold && y < yThreshold){ // no flicks in the region specified by the threashold return TABLET_DISABLE_FLICKS; } // flicks will happen otherwise return 0; }
The following example shows how to disable various flicks features for an entire window.
C++
const DWORD dwHwndTabletProperty = TABLET_DISABLE_PRESSANDHOLD | // disables press and hold (right-click) gesture TABLET_DISABLE_PENTAPFEEDBACK | // disables UI feedback on pen up (waves) TABLET_DISABLE_PENBARRELFEEDBACK | // disables UI feedback on pen button down (circle) TABLET_DISABLE_FLICKS; // disables pen flicks (back, forward, drag down, drag up) void SetTabletpenserviceProperties(HWND hWnd){ ATOM atom = ::GlobalAddAtom(MICROSOFT_TABLETPENSERVICE_PROPERTY); ::SetProp(hWnd, MICROSOFT_TABLETPENSERVICE_PROPERTY, reinterpret_cast<HANDLE>(dwHwndTabletProperty)); ::GlobalDeleteAtom(atom); }
Requirements
Minimum supported client | Windows Vista |
---|---|
Minimum supported server | Windows Server 2008 |
Header | Tpcshrd.h |
相关文章推荐
- 常用模拟开关芯片引脚,功能及应用电路
- okHttp的(get,还有一些其他功能)实际应用
- 【xinfanqie】不为人知的Win7右键菜单添加功能
- win7如何创建系统还原及系统修复光盘功能应用
- DSAPI新功能之-WIN7特效示例
- win7下的添加自定义右键功能 注册表文件
- 标准IO的简单应用,动静态库,读取系统时间并打印,模拟ls -l功能
- 的VARCHART JGantt让你设计一个甘特图包含精确规划需求所需的功能,无论是项目计划,人员配置,生产控制或其他应用领域。
- MFC应用:在视图窗口中间显示计数,功能:点击左键加1右键减1
- AJ学IOS(45)之常用的小功能比如打电话、打开网址、发邮件、发短信打开其他应用。
- oncontextmenu 事件取消鼠标右键功能
- FSO删除,及其其他功能用法,及其在windows系统中应用
- 如何取消鼠标右键功能
- 模拟股票涨跌功能(jquery应用4)
- SecureCRT 7.0 右键复制功能的打开/取消
- Win7应用小技巧:取消系统锁屏唤醒密码
- 取消putty右键粘贴功能
- 1模拟网易邮箱实现全选,全不的功能(服务端和客户端) 2 使用DataList实现 加入购物车,编辑,删除,更新,取消功能。要求连一个产品表。
- Windows7系统如何取消U盘自动运行功能 win7设置关闭U盘自动运行教程图解
- 【91xcz】Win7控制面板三大功能应用技巧