Accessing windows key press msgs in dialog
Posted on 2004-08-10
I need to be able to processes the WM_KEYDOWN message in a dialog based app. I am aware that you cannot simply use WindowProc to pic up the message, and was wondering, what is the best/easiest way to to it?
I have heard that you can use PreTranslateMessage, but that this is frowned upon (although I have heard no reasons why). Here is an example of how you are supposed to be able to do it using that method:
BOOL CMyDlg::PreTranslateMessage(MSG* pMsg)
How should I do it?