void CPlayerToolBar::OnLButtonDown(UINT nFlags, CPoint point) { int i = getHitButtonIdx(point); if (!m_pMainFrame->m_fFullScreen && (i < 0 || (GetButtonStyle(i) & (TBBS_SEPARATOR | TBBS_DISABLED)))) { MapWindowPoints(m_pMainFrame, &point, 1); m_pMainFrame->PostMessage(WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM(point.x, point.y)); } else { __super::OnLButtonDown(nFlags, point); } }
void CPlayerToolBar::OnMouseMove(UINT nFlags, CPoint point) { int i = getHitButtonIdx(point); if (i == -1 || (GetButtonStyle(i) & (TBBS_SEPARATOR | TBBS_DISABLED))) { ; } else { if (i != 10 && i != 11) { ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_HAND)); } } __super::OnMouseMove(nFlags, point); }
void CPlayerToolBar::OnMouseMove(UINT nFlags, CPoint point) { CMainFrame* pFrame = (CMainFrame*)GetParentFrame(); int i = getHitButtonIdx(point); if (i == -1 || (GetButtonStyle(i) & (TBBS_SEPARATOR | TBBS_DISABLED))) { } else { if (i > 10 || i < 2 || i == 6 || (i < 10 && (pFrame->IsSomethingLoaded() || pFrame->IsD3DFullScreenMode()))) { ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_HAND)); } } __super::OnMouseMove(nFlags, point); }
BOOL CPlayerToolBar::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) { BOOL ret = FALSE; if (nHitTest == HTCLIENT) { CPoint point; VERIFY(GetCursorPos(&point)); ScreenToClient(&point); int i = getHitButtonIdx(point); if (i >= 0 && !(GetButtonStyle(i) & (TBBS_SEPARATOR | TBBS_DISABLED))) { ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_HAND)); ret = TRUE; } } return ret ? ret : __super::OnSetCursor(pWnd, nHitTest, message); }
void CPlayerToolBar::OnLButtonDown(UINT nFlags, CPoint point) { int i = getHitButtonIdx(point); CMainFrame* pFrame = ((CMainFrame*)GetParentFrame()); if (i == -1 || (GetButtonStyle(i) & (TBBS_SEPARATOR | TBBS_DISABLED))) { if (!pFrame->m_fFullScreen) { MapWindowPoints(pFrame, &point, 1); pFrame->PostMessage(WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM(point.x, point.y)); } } else { if (i != 10 && i != 11) { ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_HAND)); } __super::OnLButtonDown(nFlags, point); } }
void CPlayerToolBar::OnRButtonDown(UINT nFlags, CPoint point) { CMainFrame* pFrame = (CMainFrame*)GetParentFrame(); int Idx = getHitButtonIdx(point); if (Idx == 1) { pFrame->PostMessage(WM_COMMAND, ID_FILE_CLOSEPLAYLIST); } else if (Idx == 5) { pFrame->OnMenuNavJumpTo(); } else if (Idx == 6) { pFrame->OnMenuRecentFiles(); } else if (Idx == 8) { pFrame->OnMenuNavAudioOptions(); } else if (Idx == 9) { pFrame->OnMenuNavSubtitleOptions(); } __super::OnRButtonDown(nFlags, point); }
void CPlayerToolBar::OnLButtonDown(UINT nFlags, CPoint point) { CMainFrame* pFrame = (CMainFrame*)GetParentFrame(); OAFilterState fs = pFrame->GetMediaState(); int i = getHitButtonIdx(point); if (i == 0 && fs != -1) { pFrame->PostMessage(WM_COMMAND, ID_PLAY_PLAYPAUSE); } else if (i == -1 || (GetButtonStyle(i) & (TBBS_SEPARATOR | TBBS_DISABLED))) { if (!pFrame->m_fFullScreen) { MapWindowPoints(pFrame, &point, 1); pFrame->PostMessage(WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM(point.x, point.y)); } } else { if (i > 10 || (i < 10 && (pFrame->IsSomethingLoaded() || pFrame->IsD3DFullScreenMode()))) { ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_HAND)); } __super::OnLButtonDown(nFlags, point); } }