16,472
社区成员
发帖
与我相关
我的任务
分享
\c++BOOL CXXXX::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
switch( pMsg->message )
{
case WM_MOUSELEAVE:
break;
case WM_MOUSEHOVER:
break;
case WM_MOUSEMOVE:
TRACKMOUSEEVENT trmouse;
trmouse.cbSize = sizeof(TRACKMOUSEEVENT);
trmouse.dwFlags = TME_LEAVE | TME_HOVER;
trmouse.dwHoverTime = 2000;
trmouse.hwndTrack = pMsg->hwnd;
if(!_TrackMouseEvent(&trmouse))
return FALSE;
break;
}
return CWnd::PreTranslateMessage(pMsg);
}