1、消息映射
ON_WM_NCHITTEST()
2、函数声明
afx_msg LRESULT OnNcHitTest(CPoint point);
3、函数实现
LRESULT CMFCSeerDlg::OnNcHitTest(CPoint point)
{CRect rect;
GetClientRect(rect);
ClientToScreen(rect);
if (rect.PtInRect(point))
return HTCAPTION;
return CDialog::OnNcHitTest(point);
}