Prblm with SDI
-
Hai frens. . . I am facing a prblm in SDI. My SDI will be in maximized state initially. . . So, i do like this. . ShowWindow(SW_MAXIMIZE). After that i want that maximize button disabled so i remove the style WS_MAXIMIZEBOX. IF i do so the SDI will be maximized initially but it becomes MOVABLE. How to handle this. . .I need it to be immovable. Plz help me with this prblm Tanx
-
Hai frens. . . I am facing a prblm in SDI. My SDI will be in maximized state initially. . . So, i do like this. . ShowWindow(SW_MAXIMIZE). After that i want that maximize button disabled so i remove the style WS_MAXIMIZEBOX. IF i do so the SDI will be maximized initially but it becomes MOVABLE. How to handle this. . .I need it to be immovable. Plz help me with this prblm Tanx
Hello, You can simply take the handle of the SystemMenu using GetSystemMenu and remove the Move menu. The code goes like this... void CMainFrame::DisableMoveWindow() { CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { pSysMenu->RemoveMenu(1, MF_BYPOSITION); } } Call this function in the OnCreate of CMainFrame() ;) Vikram Kashyap "You will never fail until you stop trying"
-
Hello, You can simply take the handle of the SystemMenu using GetSystemMenu and remove the Move menu. The code goes like this... void CMainFrame::DisableMoveWindow() { CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { pSysMenu->RemoveMenu(1, MF_BYPOSITION); } } Call this function in the OnCreate of CMainFrame() ;) Vikram Kashyap "You will never fail until you stop trying"
Thanx Vikram prblm solved. .
-
Hello, You can simply take the handle of the SystemMenu using GetSystemMenu and remove the Move menu. The code goes like this... void CMainFrame::DisableMoveWindow() { CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { pSysMenu->RemoveMenu(1, MF_BYPOSITION); } } Call this function in the OnCreate of CMainFrame() ;) Vikram Kashyap "You will never fail until you stop trying"
Thanx Vikram prblm solved. . .