aplayer:代码中这些消息都有的:
MESSAGE_HANDLER(WM_MOUSEWHEEL, OnMouseWheel);
MESSAGE_HANDLER(WM_MOUSEHOVER, OnMouseHover);
MESSAGE_HANDLER(WM_MOUSELEAVE, OnMouseLeave);
查一下是否是代码没有调用 TrackMouseEvent ?
在APlayerSDK中的SimplePlayer例子里,
文件simpleplayer.cpp 中,插入如下代码:
HRESULT CMyPlayer::OnMessage(LONG nMessage, LONG wParam, LONG lParam)
{
switch(nMessage)
{
/////////////////// 测试WM_MOUSELEAVE ///////////////////////////
case WM_MOUSEMOVE:
{
TRACKMOUSEEVENT tme;
tme.cbSize = sizeof(TRACKMOUSEEVENT);
tme.dwFlags = TME_HOVER | TME_LEAVE;
tme.dwHoverTime = HOVER_DEFAULT;
tme.hwndTrack = m_hAPlayerWnd;
TrackMouseEvent(&tme);
}
break;
case WM_MOUSELEAVE:
break;
////////////////////// 测试WM_MOUSELEAVE //////////////////////////
.....
}
调试中WM_MOUSELEAVE不响应,不知为何?
请指教,谢谢!!!