Newly create a dialog-based project then open ClassWizard Select the Class Info tab, and select Window in Message Filter, I will select your dialog box in the MessageMaps tab, select WM_NCHITTEST in Messages Click Add Function and click Edit Code then add the following code uint cmovenocaptiondlg :: Onnittest (cpoint point) {cpoint pt = point; screenToclient (& Pt); CREENTT; getClientRect (& Re);
IF (Rect.ptinRect (PT)) {Return HTCAPTION;
Return CDialog :: ONNCHITTEST (POINT);