long _icur;
ScreenToClient(&point);RECT rtWindow;GetClientRect(&rtWindow);long wndHeight = rtWindow.bottom - rtWindow.top;long wndWidth = rtWindow.right - rtWindow.left;_icur = 0;RECT rcW = {0,0,wndWidth,100};if(::PtInRect(&rcW,point)){return HTCAPTION; // 在拖动范围内}return CWnd::OnNcHitTest(point);
if(_icur==0){::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));return TRUE;}return CDialog::OnSetCursor(pWnd, nHitTest, message);
参考
原文:http://www.cnblogs.com/skyhuangdan/p/5485034.html