The GetFocus function retrieves the handle to the window that has the keyboard focus, if the window is attached to the calling thread's message queue. SyntaxHWND GetFocus(VOID);
Return ValueThe return value is the handle to the window with the keyboard focus. If the calling thread's message queue does not have an associated window with the keyboard focus, the return value is NULL.
///////////////
if(::GetFocus() == GetDlgItem(IDC_EDIT1)->m_hWnd)
{// focus is on IDC_EDIT1
}
Return ValueThe return value is the handle to the window with the keyboard focus. If the calling thread's message queue does not have an associated window with the keyboard focus, the return value is NULL.
///////////////
if(::GetFocus() == GetDlgItem(IDC_EDIT1)->m_hWnd)
{// focus is on IDC_EDIT1
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货