Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

How to Prevent Tap-and-Hold Animation Display

Windows Mobile 6.5
4/19/2010

If you do not want to provide the standard animation feedback for a tap-and-hold gesture for your application, you can set the SHRG_NOANIMATION flag when calling the SHRecognizeGesture function, as shown in the following example message handler for WM_LBUTTONDOWN.

The following code example demonstrates how to use prevent tap-and-hold animation display.

Bb158553.note(en-us,MSDN.10).gifNote:
To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.
    case WM_LBUTTONDOWN:
    {
        SHRGINFO  shrg;
        HMENU    hmenu;

        shrg.cbSize = sizeof(shrg);
        shrg.hwndClient = hWnd;
        shrg.ptDown.x = LOWORD(lParam);
        shrg.ptDown.y = HIWORD(lParam);
        shrg.dwFlags = SHRG_RETURNCMD | ;

        if (SHRecognizeGesture(&shrg) == GN_CONTEXTMENU) {
            hmenu = GetSubMenu(g_hMainMenu, 0);
            TrackPopupMenuEx(hmenu, TPM_LEFTALIGN, LOWORD(lParam),
                             HIWORD(lParam), hWnd, NULL);
        }
        break;
    }

Community Additions

Show:
© 2015 Microsoft