怎样让鼠标经过按钮时变成小手的形状...???////////////////////////////////////////////怎样让鼠标经过按钮时变成小手的形状...???
解决方案 »
- GDI+ 绘制缩略图有点问题哦
- C++题目,不会做。
- CEdit只允输入数字,有没有函数
- VC6.0调试,最后错误显示在mfc/src/strcore.cpp第325行,是什么错误??????
- vc在domodal后,如何关闭包含另外一个窗体的窗体
- vLS9q7HP0rXH89awsrvLs8mit9bHsruz
- 在onsize里调用setwindowpos问什么会出现assert failed异常??
- 请教老手
- 求助!
- 窗口激活问题,求解~
- 编程中,怎样判断BMP图像为黑白图像? 用biBitCount 是否为2判断 是否可行?
- 请问各位,如何解决位图中运动icon,icon的运动轨迹会擦掉一部分位图的问题
BOOL CYourDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
// TODO: Add your message handler code here and/or call default
if (pWnd == GetDlgItem(IDC_BUTTON))
{
SetCursor(LoadCursor(NULL, IDC_HAND));
return TRUE;
}
return CDialog::OnSetCursor(pWnd, nHitTest, message);
}
#define IDC_HAND MAKEINTRESOURCE(32649)
{
public:
void SetBtnCursor(HCURSOR cur){m_hCursor=cur;}
private:
HCURSOR m_hCursor;
}
BOOL CYourButton::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
// If a cursor was specified then use it!
if (m_hCursor != NULL)
{
::SetCursor(m_hCursor);
return TRUE;
}
return CButton::OnSetCursor(pWnd, nHitTest, message);
}
然后在你createbutton的后面加上
//CYourButton m_btnYourButton;
HCURSOR Hand=::LoadCursor(NULL, MAKEINTRESOURCE(32649));
m_btnYourButton.SetBtnCursor(Hand)
怎么设置??
有谁能给我具体的谢谢啊,
劳累了..