日期:2014-05-16 浏览次数:20473 次
重载DefWindowProc()函数,过滤WM_NCLBUTTONDBLCLK在HTCAPTION区的响应即可:
#define WM_NCLBUTTONDBLCLK 0x00A3 LRESULT CMainFrame::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) { // TODO: Add your specialized code here and/or call the base class switch(message) { case WM_NCLBUTTONDBLCLK: if(HTCAPTION==wParam) { return 0; } } return CFrameWnd::DefWindowProc(message, wParam, lParam); }