Keep application iconized
Tony Pan -- tpan@wise.com Wednesday, May 01, 1996 WInNT 3.51, VC4.1/MFC4.1 I am working on an application. I want to keep this application iconized. User should be only allowed to move/close the application. I try to use the following code: void CMainFrame::OnInitMenu(CMenu* pMenu) { CFrameWnd::OnInitMenu(pMenu); CMenu* pSysMenu = GetSystemMenu(FALSE); if (pMenu == pSysMenu) { pSysMenu->EnableMenu(SC_MAXIMIZE, MF_GRAYED|MF_BYCOMMAND); pSysMenu->DeleteMenu(SC_RESTORE, MF_GRAYED|MF_BYCOMMAND); } } and I set CWinApp::m_nCmd = SW_MINIMIZE in CWinApp::InitInstance(). The application came up iconized, but All system menu items are enabled. Next time, the code seems to work fine. Help. thanks.
Mario Contestabile -- Mario_Contestabile.UOS__MTL@UOSMTL2.universal.com Friday, May 03, 1996 >I am working on an application. I want to keep this application iconized. BOOL CMainFrame::OnQueryOpen(){ return FALSE; } mcontest@universal.com
| Вернуться в корень Архива |