PreTranslateMessage
-
From the MSDN Library: Return Value Nonzero if the message was translated and should not be dispatched; 0 if the message was not translated and should be dispatched I have a PreTranslateMessage function (with MFC) to catch some special keys (actually WM_SYSKEYUP). When my "special" keystroke arrives, I process it, and I don't want it to be further processed. However, no matter what return code I give back, the message will be processed, i.e. the character arrives as if it had not been processed yet. Modifying the MSG structure (the parameter of the function) yields nothing. What can I do? Should I use another function instead of PreTranslateMessage? Which one? Thanks
-
From the MSDN Library: Return Value Nonzero if the message was translated and should not be dispatched; 0 if the message was not translated and should be dispatched I have a PreTranslateMessage function (with MFC) to catch some special keys (actually WM_SYSKEYUP). When my "special" keystroke arrives, I process it, and I don't want it to be further processed. However, no matter what return code I give back, the message will be processed, i.e. the character arrives as if it had not been processed yet. Modifying the MSG structure (the parameter of the function) yields nothing. What can I do? Should I use another function instead of PreTranslateMessage? Which one? Thanks
-
try it in PreTranslateMessage() if (pMsg->message == WM_SYSKEYUP) { //do your things; //return your bool; } else return CDialog::PreTranslateMessage(pMsg); Hello World!