BOOL PreTranslateMessage(MSG* pMsg)
这个函数一般起什么作用?主要功能是什么?在哪些情况下可能要用到它?

解决方案 »

  1.   

    ResOverride 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.
      

  2.   

    这个函数在系统调用每一个消息的消息处理函数之前被调用。如果这个函数返回TRUE,系统就不再进一步调用对应的消息处理函数而返回,否则系统再调用相应的消息处理函数。
        意思就是说可以在这个函数中截获消息。