RegisterGesture (Windows Embedded CE 6.0)
1/6/2010
You can use this function in two ways:
- To register a custom gesture with the gesture recognizer engine, call RegisterGesture during the initialization of your custom gesture recognizer.
- To query the ID of a gesture that you registered, call RegisterGesture with the name of the registered gesture.
Syntax
BOOL RegisterGesture (
LPCWSTR pszName,
PDWORD_PTR pdwID
);
Parameters
- pszName
[in] A case-insensitive string that represents the name of the gesture to register. The string can be up to 63 characters.
pdwID
[out] Pointer to a DWORD value that represents the ID of the registered gesture.When a gesture recognizer recognizes this gesture, it sends this ID as the wParam value in a WM_GESTURE window message.
Return Value
Returns true if function succeeds; otherwise, false. To retrieve extended error information, call GetLastError.
Remarks
You can register a maximum of 63 gestures, including the default core gestures. Each gesture must have a unique name and ID. When a user first touches the screen, the gesture recognizer engine loads and initializes the following core gestures first, followed by your custom gestures:
- Begin
- End
- Pan
- Rotate
- Scroll
- Hold
- Select
- DoubleSelect
You can call RegisterGesture with the name of an existing registered gesture to retrieve the ID of that gesture.
Important
When registering a new gesture, you must use a unique gesture name that does not conflict with any registered gesture names. This includes the built-in gesture names that are listed previously.
When a gesture is registered, it remains registered until the device is restarted.
After you have registered a gesture, you can enable or disable it by calling EnableGestures or DisableGestures.
Requirements
Header | pwinuser.h |
Library | TouchGesture.lib |
sysgen | SYSGEN_TOUCHGESTURE |