Trapping KeyBoard events
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
-
I found that i need to override PreTranslateMessage to trap events . if(pMsg->message==WM_KEYUP ){ CString text; text.Format("Key params %d ",pMsg->wParam); AfxMessageBox(text); return true; } I need to trap a sequence of ALT-CTRL-E ? How can I do this ?
If you're looking for all 3 keys to held down at the same time, just look for one of them (like "E") with PreTranslateMessage, then check keystate of others with GetAsyncKeyState. VK_CONTROL is virtkey for Ctrl, and VK_MENU is virtkey for Alt.