|
Wince 应用程序不能截获VK_MENU按键
[复制链接]
- //Send.exe
- keybd_event(VK_MENU, 0x0, KEYEVENTF_SILENT, 0);
- keybd_event(VK_MENU, 0x0, KEYEVENTF_SILENT | KEYEVENTF_KEYUP, 0);
- //Rev.exe
- BOOL CRev::PreTranslateMessage(MSG* pMsg)
- {
- // TODO: Add your specialized code here and/or call the base class
- if (pMsg->message == WM_KEYDOWN)
- {
- if (pMsg->wParam == VK_MENU)
- {
- MessageBox(L"Menu");
- }
- }
- return CDialog::PreTranslateMessage(pMsg);
- }
- //Rev.exe是活动窗口,可以收到VK_LEFT,VK_HOME等,但就是收不到VK_MENU
- //用WIN32和MFC程序都不能截获
- //不知道是怎么回事
复制代码
|
|