关于手机的长按键消息
手机长按键时是向窗口发送的什么消息啊??
[解决办法]
GN_CONTEXTMENU 是检测长按笔的
[解决办法]
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
SHRG_NOANIMATION;
if (SHRecognizeGesture(&shrg) == GN_CONTEXTMENU) {
hmenu = GetSubMenu(g_hMainMenu, 0);
TrackPopupMenuEx(hmenu,
TPM_LEFTALIGN,
LOWORD(lParam),
HIWORD(lParam),
hWnd,
NULL);
}
break;
}
MSDN上揪的,用来判断长按键