你好:
在MFC里,有一个窗口成员函数OnActivate
afx_msg void OnActivate(
UINT nState,
CWnd* pWndOther,
BOOL bMinimized
);
nState : CWnd 激活或停用。</sentencetext><sentencetext xmlns="http://www.w3.org/1999/xhtml">它可以是下列值之一:</sentencetext>
-
WA_INACTIVE。</sentencetext>
-
WA_ACTIVE 窗口通过某种方法激活除了鼠标单击外部(例如,利用选择窗口的键盘界面)。</sentencetext>
-
WA_CLICKACTIVE。</sentencetext>
pWndOther :CWnd 的指针激活或停用的。</sentencetext>NULL,因此,它可以是临时文件。</sentencetext>
bMinimized : <sentencetext xmlns="http://www.w3.org/1999/xhtml">指定激活或停用的
CWnd 的最小化状态。</sentencetext>TRUE 的值指示窗口最小化。</sentencetext>CWnd 被激活 ;否则不被激活。</sentencetext>
详细信息可以参照:http://msdn.microsoft.com/zh-cn/library/1f31c334.aspx
还有WM_MDIACTIVATE这个消息。