The dialog can overload virtual functions defWindowProc () in the dialog. LRESULT CMyDlg :: DefWindowProc (UINT message, WPARAM wParam, LPARAM lParam) {if (message == 133) ShowWindow (SW_HIDE); return CDialog :: DefWindowProc (message, wParam, lParam);} framework BOOL CMainFrame :: PreCreateWindow (CREATESTRUCT & CS) {cs.style = WS_POPUP; // Make the main window not visible cs.dwexStyle | = WS_EX_TOOLWINDOW; // does not display the task button
IF (! cframewnd :: PrecreateWindow (CS)) Return False;
Return True;}