what are common for pretranslatemessage and winproc functions and how are they different ?
Thank you
Printable View
what are common for pretranslatemessage and winproc functions and how are they different ?
Thank you
The WindowProc is a heart if any windows application
It is application defined for processing desired messages.
WindowProc is called by the system directly delivering all messages as a result of the SendMessage call or delivering messages from a message queue that were placed there as a result of the PostMessage call.
The PreTranslateMessage is MFC specific and is implemented as a virtual member of CWinThread, CWinApp and CWnd. There is no PreTranslateMessage in pure Win32 API based application.
It is used in CWinThread/App to allow application translate windows message (mainly acceleration keys) before they reach Window TranslateMessage API that is called from a main message loop to translate virtual keys messages and before messages are dispatched to a WindowProc.