SetFocus The SetFocus function sets the keyboard focus to the specified window. The window must be associated with the calling thread's message queue. GetFocus The GetFocus function retrieves the handle to the window that has the keyboard focus, if the window is associated with the calling thread's message queue.
The SetFocus function sets the keyboard focus to the specified window. The window must be associated with the calling thread's message queue.
GetFocus
The GetFocus function retrieves the handle to the window that has the keyboard focus, if the window is associated with the calling thread's message queue.
GetActiveView()函数可以获得当前窗口。
void CxxxView::OnSetFocus(CWnd* pOldWnd)
{
CScrollView::OnSetFocus(pOldWnd);
}
void CxxxView::OnSetFocus(CWnd* pOldWnd)
{
CScrollView::OnSetFocus(pOldWnd);
}
同时GetActiveView()函数可以获得当前窗口。