HP TouchSmart 9100 Resources for Developing Touch-Friendly Applications for HP - Page 16
shows the states of the gesture: GID_BEGIN, GID_INERTIA or
View all HP TouchSmart 9100 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 16 highlights
BOOL bResult = GetGestureInfo((HGESTUREINFO)lParam, &gi); BOOL bHandled = FALSE; if (bResult){ // now interpret the gesture switch (gi.dwID){ case GID_ZOOM: // Code for zooming goes here bHandled = TRUE; break; case GID_PAN: // Code for panning goes here bHandled = TRUE; break; case GID_ROTATE: // Code for rotation goes here bHandled = TRUE; break; case GID_TWOFINGERTAP: // Code for two-finger tap goes here bHandled = TRUE; break; case GID_PRESSANDTAP: // Code for roll over goes here bHandled = TRUE; break; default: // A gesture was not recognized break; } }else{ DWORD dwErr = GetLastError(); if (dwErr > 0){ //MessageBoxW(hWnd, L"Error!", L"Could not retrieve a GESTUREINFO structure.", MB_OK); } } if (bHandled){ return 0; }else{ return DefWindowProc(hWnd, message, wParam, lParam); } } The gesture information structure GESTUREINFO contains additional information that may be helpful to your application: dwFlags shows the states of the gesture: GID_BEGIN, GID_INERTIA or GID_END. pstLocation shows the location relating to the gesture (for example, pstLocation indicates the center of a zoom gesture) 16