点击客户区移动窗口

    1、
        void CWndTest::OnLButtonDown(UINT nFlags, CPoint point)
        {
            // TODO: Add your message handler code here and/or call default
            TRACE("CWndTest::OnLButtonDown\n");
            AfxGetMainWnd()->PostMessage(WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM(point.x, point.y));
            CWnd::OnLButtonDown(nFlags, point);
        }
    2、
        UINT CEdSearch::OnNcHitTest( CPoint point )
        {
            return HITCAPTURE;
        }

原文地址:https://www.cnblogs.com/vc60er/p/1809331.html