void CDlgLogin::OnMouseMove(UINT nFlags, CPoint point)
{
if(MK_LBUTTON == nFlags)
{
CPoint newPoint = point;
ClientToScreen(&newPoint);
int x = newPoint.x - m_oldPoint.x;
int y = newPoint.y - m_oldPoint.y;
CRect rect;
GetWindowRect(&rect);
rect.left += x;
rect.top += y;
SetWindowPos(NULL, rect.left, rect.top, 0, 0, SWP_NOSIZE);
} CDialog::OnMouseMove(nFlags, point);
}void CDlgLogin::OnLButtonDown(UINT nFlags, CPoint point)
{
m_oldPoint = point;
ClientToScreen(&m_oldPoint); CDialog::OnLButtonDown(nFlags, point);
}
结果窗口比鼠标移动速度要快的多,不知道是哪里错了。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货