Share via


CloseGestureInfoHandle (Windows Embedded CE 6.0)

1/6/2010

This function closes a gesture information handle. An HGESTUREINFO gesture handle is valid until this function is called. To avoid memory leaks, when you are done processing a message, you must call this function in the procedure that handles the gesture message. If the message passes through to the default window procedure, the default window procedure automatically calls CloseGestureInfoHandle.

Syntax

BOOL CloseGestureInfoHandle (
   HGESTUREINFO hGestureInfo
);

Parameters

  • hGestureInfo
    The gesture information handle, HGESTUREINFO, obtained from the lparam of the WM_GESTURE window message.

Return Value

Returns true if function succeeds; otherwise, false.

Remarks

The following sample code demonstrates how an application can process a gesture and then close the handle by calling CloseGestureInfoHandle.

case WM_GESTURE: {
    HGESTUREINFO hgi = reinterpret_cast<HGESTUREINFO>(lParam);
    if (wParam == GID_SELECT) {
        GESTUREINFO gi;
        gi.cbSize = sizeof(GESTUREINFO);
        if (GetGestureInfo(hgi, &gi)) {
            ProcessSelect();
        }
        CloseGestureInfoHandle(hgi);
        Return 1;
    }
    break; // Fall through to DefWindowProc

Requirements

Header pwinuser.h
Library TouchGesture.lib
sysgen SYSGEN_TOUCHGESTURE

See Also

Reference

WM_GESTURE

Other Resources

Gesture Functions