1.通过拖动按钮来拖动对话框的功能实现: UINT CButtonMoveWindowDlg::OnNcHitTest(CPoint point) { // TODO: Add your message handler code here and/or call default CRect rc; GetClientRect(&rc); ClientToScreen(&rc); return rc.PtInRect(point) ? HTCAPTION : CDialog::OnNcHitTest(point); // return CDialog::OnNcHitTest(point); } 程序界面如下: 把CButton类重新写一下。 源代码软件下载:http://download.csdn.net/source/1617766