

In MyView.h, add the following: virtual ULONG GetGestureStatus(CPoint ptTouch) Let's assume that it is a view class named CMyView defined in MyView.h, and implemented in MyView.cpp. If your MFC application needs this gesture to implement right-click handling, you must override the virtual GetGestureStatus function for any derived window classes that need to implement a right-click handler. So, for this reason, the default behavior is to disable the press and hold gesture. Thus, it will take longer for left click events to be raised, and the application will seem less responsive. In order to detect this gesture, by necessity some delay is introduced to distinguish between a simple press (treated as a left-click) and a press and hold (right-click). To enable the right-click concept that usually means display the context menu, and comes in the form of WM_RBUTTONDOWN, WM_RBUTTONUP, and WM_CONTEXTMENU messages and ISG_HOLDENTER and ISG_RIGHTTAP events, the press and hold gesture must be enabled for that window. Default behavior: Disable press and hold gesture If your application wants to enable the press-and-hold gesture, you must override this method in your derived window class and return something that doesn't include the TABLET_DISABLE_PRESSANDHOLD flag. This method calls the virtual function CWnd::GetGestureStatus, which will then return TABLET_DISABLE_PRESSANDHOLD, for performance reasons. In an MFC application, all windows are typically derived from the CWnd class, and this base class handles this message in its OnTabletQuerySystemGestureStatus method.

WM_TABLET_QUERYSYSTEMGESTURESTATUS message to active windows that could receive user input. On a Tablet PC running Windows, the system will send a Original product version: Visual Studio 2010 and later versions Original KB number: 2846829 Summary
Gimpshop press and hold tablet how to#
This article provides information about how to enable press-and-hold gesture in a Microsoft Foundation Class (MFC) application.
