MFC中的WindowProc
周晓荣 2010-08-15 05:56:58 通过ClassWizard添加WindowProc过程函数
这个函数是处理窗口的消息的吧?
例如:
LRESULT CDesktop_ToolDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
// TODO: Add your specialized code here and/or call the base class
if(message==WM_CLOSE)
if(IDYES==MessageBox("确定退出?",NULL,MB_YESNO))PostMessage(0);
return CDialog::WindowProc(message, wParam, lParam);
}
这样子是不是就把WM_CLOSE消息给截取了?
就是说我在这里如果处理了这个消息,那么窗口就不会再处理这个消息了?