重载DefWindowProc,在里面截获WM_NCLBUTTONDBLCLK消息进行处理:
LRESULT CDlg::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
// TODO: Add your specialized code here and/or call the base class
if( message == WM_NCLBUTTONDBLCLK && (INT)wParam == HTCAPTION )
{
return 0;
}
return CDialog::DefWindowProc(message, wParam, lParam);
}