控件的Notify属性要为TRUE, WM_MOUSEMOVE就可以用MFC标准消息映射接收到.
要处理WM_MOUSEHOVER和WM_MOUSELEAVE, 需要在OnMouseMove里写入:
TRACKMOUSEEVENT sEvent = { sizeof(TRACKMOUSEEVENT), TME_LEAVE|TME_HOVER, GetSafeHwnd(), 5 }; _TrackMouseEvent(&sEvent);
才可以接收到hover, leave消息.
控件的Notify属性要为TRUE, WM_MOUSEMOVE就可以用MFC标准消息映射接收到.
要处理WM_MOUSEHOVER和WM_MOUSELEAVE, 需要在OnMouseMove里写入:
TRACKMOUSEEVENT sEvent = { sizeof(TRACKMOUSEEVENT), TME_LEAVE|TME_HOVER, GetSafeHwnd(), 5 }; _TrackMouseEvent(&sEvent);
才可以接收到hover, leave消息.