请问,在vc中怎么改变鼠标指针?? 响应WM_SETCURSOR该消息是在WM_NCHITTEST后发出的。当然,你必须先有图标资源。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 AfxGetApp()->LoadCursor(ResourceID) BOOL CTestPronDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) { // TODO: Add your message handler code here and/or call default HCURSOR newHCursor; CString str; LONG CursorID; ::GetClassName(pWnd->m_hWnd,str.GetBuffer(80),80); if (str.Compare("Button")) { return CDialog::OnSetCursor(pWnd, nHitTest, message); } if (pWnd==GetDlgItem(IDC_NEXT)) CursorID=IDC_COLORHAND; else CursorID=IDC_HAND; newHCursor=AfxGetApp()->LoadCursor(CursorID); ::SetCursor(newHCursor); return TRUE;} 如何直接把图片拖进单文档内显示 两个单独的程序参数传递的问题 dll自定义类往List Control 中写值 一个非常简单的问题 vc的编译过程不太理解?哪位大虾帮帮忙 一个简单的小问题!真的的举手之劳! 事务commit//在select的sql语句执行完毕之后使用? 如何在对话框中加入菜单? 请教win7系统中使用winIO3.0可以用吗? m_filecount.Format("File Count:%d", f.count); f.count为int,值为2,可是m_filecount为什么是4198450? 如何正确的使用DCOM 经典的VC++ SDK 编译问题
{
// TODO: Add your message handler code here and/or call default
HCURSOR newHCursor;
CString str;
LONG CursorID; ::GetClassName(pWnd->m_hWnd,str.GetBuffer(80),80);
if (str.Compare("Button"))
{
return CDialog::OnSetCursor(pWnd, nHitTest, message);
}
if (pWnd==GetDlgItem(IDC_NEXT))
CursorID=IDC_COLORHAND;
else
CursorID=IDC_HAND;
newHCursor=AfxGetApp()->LoadCursor(CursorID);
::SetCursor(newHCursor);
return TRUE;
}