15,979
社区成员
发帖
与我相关
我的任务
分享
void CTestDlg::OnMouseMove(UINT nFlags, CPoint point)
{
if (m_bMouseMove == FALSE)
{
TRACKMOUSEEVENT tme;
tme.cbSize = sizeof(tme);
tme.dwFlags = TME_LEAVE;
tme.hwndTrack = GetSafeHwnd();
_TrackMouseEvent(&tme);
m_bMouseMove = TRUE;
}
CDialog::OnMouseMove(nFlags, point);
}
void CTestDlg::OnMouseLeave(WPARAM wParam, LPARAM lParam)
{
POINT pt;
GetCursorPos(&pt);
ScreenToClient(&pt);
if (ChildWindowFromPoint(pt) == NULL)
{
AfxMessageBox("MouseLeave");
}
m_bMouseMove = FALSE;
}