Updated: November 2007Override this function to filter window messages before they are dispatched to the Windows functions TranslateMessage and DispatchMessage The default implementation performs accelerator-key translation, so you must call the CWinApp::PreTranslateMessage member function in your overridden version. virtual BOOL PreTranslateMessage( MSG* pMsg ); Parameters pMsg A pointer to a MSG structure that contains the message to process. Return Value Nonzero if the message was fully processed in PreTranslateMessage and should not be processed further. Zero if the message should be processed in the normal way. Requirements Header: afxwin.h
virtual BOOL ProcessMessageFilter( int code, LPMSG lpMsg ); Parameters code Specifies a hook code. This member function uses the code to determine how to process lpMsg. lpMsg A pointer to a Windows MSG structure. Return Value Nonzero if the message is processed; otherwise 0. Res A hook function processes events before they are sent to the application's normal message processing. If you override this advanced feature, be sure to call the base-class version to maintain the framework's hook processing. Requirements Header: afxwin.h
virtual BOOL PreTranslateMessage(
MSG* pMsg
);
Parameters
pMsg
A pointer to a MSG structure that contains the message to process. Return Value
Nonzero if the message was fully processed in PreTranslateMessage and should not be processed further. Zero if the message should be processed in the normal way. Requirements
Header: afxwin.h
int code,
LPMSG lpMsg
);
Parameters
code
Specifies a hook code. This member function uses the code to determine how to process lpMsg. lpMsg
A pointer to a Windows MSG structure. Return Value
Nonzero if the message is processed; otherwise 0. Res
A hook function processes events before they are sent to the application's normal message processing. If you override this advanced feature, be sure to call the base-class version to maintain the framework's hook processing. Requirements
Header: afxwin.h