HCUROSR光标
LoadStandardCursor:加载系统光标
SetCursor:设置光标
void CCursorMouseDemoView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CMainFrame* pMainframe;
pMainframe=(CMainFrame*)AfxGetMainWnd();
SetCursor(pMainframe->m_cursor);//设置光标为自绘光标
CView::OnLButtonDown(nFlags, point);
}
void CCursorMouseDemoView::OnRButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
HCURSOR cusor=AfxGetApp( )->LoadStandardCursor(IDC_CROSS); //获取系统标准光标
SetCursor(cusor); //设置光标
CView::OnRButtonUp(nFlags, point);
}
void CCursorMouseDemoView::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CMainFrame* pMainframe;
pMainframe=(CMainFrame*)AfxGetMainWnd();
SetCursor(pMainframe->m_cursor);//设置光标为自绘光标
CView::OnLButtonUp(nFlags, point);
}