SetClassLong,GetClassLong 动态改变光标

来源:互联网 发布:常州智能网络地板厂家 编辑:程序博客网 时间:2024/04/29 13:55
void CTestCursorDlg::OnLButtonUp(UINT nFlags, CPoint point)
{
 // TODO: Add your message handler code here and/or call default
 SetClassLong(m_hWnd,GCL_HCURSOR,(long)m_hCursor);
 CDialog::OnLButtonUp(nFlags, point);
} void CTestCursorDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
 // TODO: Add your message handler code here and/or call default
 m_hCursor=(HCURSOR)GetClassLong(m_hWnd,GCL_HCURSOR);
 SetClassLong(m_hWnd,GCL_HCURSOR,(long)(LoadCursor(NULL,IDC_CROSS)));
 CDialog::OnLButtonDown(nFlags, point);
}
0 0
原创粉丝点击