如何在对话框里实现鼠标的变换,请详细些。谢谢
解决方案 »
- 刚学VC++但是对MFC排斥正常吗?
- 奇怪,在vc6对话框上放一个group,group里面的放3个radioButton,第一个设为
- 在单文档界面里在非客户区放张图片(就在菜单的位置)
- select中如何比较时间
- 怎样在VC6.0里制作用VC编写的程序的发行版软件?
- 如何获得手写板的签名??百思不得其解,期待高人指点迷津!谢谢
- 我怎样才能在dll中发送自定义的消息如WM_UUU?
- delete一个 CWnd* 问题
- 如何修改每个模板对应的标题 if(str == _T("········"))
- 为什么不行?(一个ADO的问题)
- 如何用渐变的颜色填充?
- 如何解决USB插拔时系统多次发出WM_DEVICECHANGE的问题!急阿~!
SetCursor()void CAutoEditDlg::OnMouseMove(UINT nFlags, CPoint point)
{
/*if(m_rtEdit.PtInRect(point))
{
str.Format("x=%d,y=%d",point.x,point.y);
AfxMessageBox(str);
}*/ if(point.x==m_rtEdit.right&&point.y==m_rtEdit.bottom)
{
SetCursor(::LoadCursor(NULL,IDC_SIZENWSE));
m_bNWSEMoveReady=TRUE;
m_bWEMoveReady=FALSE;
m_bNSMoveReady=FALSE; }
else if(point.x==m_rtEdit.right&&point.y<m_rtEdit.bottom&&point.y>m_rtEdit.top)
{
SetCursor(::LoadCursor(NULL,IDC_SIZEWE));
m_bWEMoveReady=TRUE;
m_bNWSEMoveReady=FALSE;
m_bNSMoveReady=FALSE;
}
else if(point.y==m_rtEdit.bottom&&point.x<m_rtEdit.right&&point.x>m_rtEdit.left)
{
SetCursor(::LoadCursor(NULL,IDC_SIZENS));
m_bNSMoveReady=TRUE;
m_bNWSEMoveReady=FALSE;
m_bWEMoveReady=FALSE;
}
if(nFlags&MK_LBUTTON)
{
if(m_bWEMoveOK)
{
m_rtEdit.right=point.x;
}
if(m_bNSMoveOK)
{
m_rtEdit.bottom=point.y;
}
if(m_bNWSEMoveOK)
{
m_rtEdit.right=point.x;
m_rtEdit.bottom=point.y;
}
m_edInput.MoveWindow(&m_rtEdit);
}
CDialog::OnMouseMove(nFlags, point);
}
{
/*if(m_rtEdit.PtInRect(point))
{
str.Format("x=%d,y=%d",point.x,point.y);
AfxMessageBox(str);
}*/ if(point.x==m_rtEdit.right&&point.y==m_rtEdit.bottom)
{
SetCursor(::LoadCursor(NULL,IDC_SIZENWSE));
m_bNWSEMoveReady=TRUE;
m_bWEMoveReady=FALSE;
m_bNSMoveReady=FALSE; }
else if(point.x==m_rtEdit.right&&point.y<m_rtEdit.bottom&&point.y>m_rtEdit.top)
{
SetCursor(::LoadCursor(NULL,IDC_SIZEWE));*********
m_bWEMoveReady=TRUE;
m_bNWSEMoveReady=FALSE;
m_bNSMoveReady=FALSE;
}
else if(point.y==m_rtEdit.bottom&&point.x<m_rtEdit.right&&point.x>m_rtEdit.left)
{
SetCursor(::LoadCursor(NULL,IDC_SIZENS));********
m_bNSMoveReady=TRUE;
m_bNWSEMoveReady=FALSE;
m_bWEMoveReady=FALSE;
}
if(nFlags&MK_LBUTTON)
{
if(m_bWEMoveOK)
{
m_rtEdit.right=point.x;
}
if(m_bNSMoveOK)
{
m_rtEdit.bottom=point.y;
}
if(m_bNWSEMoveOK)
{
m_rtEdit.right=point.x;
m_rtEdit.bottom=point.y;
}
m_edInput.MoveWindow(&m_rtEdit);
}
CDialog::OnMouseMove(nFlags, point);
}