右键-类向导-消息-WM_NCHITTEST-添加程序处理-再
此函数LRESULT CMFCApplication8Dlg::OnNcHitTest(CPoint point)下添加如下代码
ScreenToClient(&point);
CRect rc;
GetClientRect(&rc);
if (rc.PtInRect(point))
{
return HTCAPTION;
}
else
{
return CDialog::OnNcHitTest(point);
}