窗口收不到WM_MOUSELEAVE

 想要收到WM_MOUSELEAVE,需要在合适的时机调用_TrackMouseEvent(如WM_MOUSEMOVE)

<textarea cols="50" rows="15" name="code" class="cpp">TRACKMOUSEEVENT t = { sizeof(TRACKMOUSEEVENT), TME_LEAVE, m_hWnd, 0 }; if (::_TrackMouseEvent(&amp;t)) { //InvalidateRect(NULL); }</textarea>

你可能感兴趣的:(null)