WM_ACTIVATE 是什么东西发出的,为什么我在工程里搜索不到 WM_ACTIVATE,但是我的工程里有::OnActivate函数
void CuiDlg::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) { CDialog::OnActivate(nState, pWndOther, bMinimized);
if(isDialogOpened() && !isSyncStarted()){
lstSources.refreshSourcePanes();
// check if the CP is activated or not. If not it can be restored
// it is checked only when the flag openUp has true, so when the oninit
checkCPWorking();
}
}
void CuiDlg::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) { CDialog::OnActivate(nState, pWndOther, bMinimized);
if(isDialogOpened() && !isSyncStarted()){
lstSources.refreshSourcePanes();
// check if the CP is activated or not. If not it can be restored
// it is checked only when the flag openUp has true, so when the oninit
checkCPWorking();
}
}
WA_INACTIVE The window is being deactivated. WA_ACTIVE The window is being activated through some method other than a mouse click (for example, by use of the keyboard interface to select the window). WA_CLICKACTIVE The window is being activated by a mouse click. 这些消息都是系统发送的
WM_ACTIVATE是一个windows消息
在MFC里响应只需用消息映射宏即可
ON_WM_ACTIVATE( )
补充一下下,WA_ACTIVE是个命令类窗口消息,在classWizard里是可以设置添加相应的消息处理函数的,
选了某个CXXXDlg类后,Object ID列表里有个ID_ACTIVATE