VC 对话框支持拖动

对话框支持拖动

添加WM_NCHITTEST 消息事件

UINTCMyAgentDlg::OnNcHitTest(CPoint point)
{
// TODO: Add your message handler code here and/or call default
    UINT nHitTest=CDialog::OnNcHitTest(point);
    return (nHitTest==HTCLIENT)?HTCAPTION:nHitTest;
//return CDialog::OnNcHitTest(point);
}

你可能感兴趣的:(VC 对话框支持拖动)