CompuServe Messages

MDIChild Windows

    11-Jul-94 18:49:45
Sb: #30232-MDIChild Windows
Fm: Steve Dirickson 70313,3252
To: Jeff Zuckerman 70354,131
<<<< I have derived a new MDIChildWnd class and have a PreCreateWindow function but I'm not sure what I need to do there. >> This should be straightforward (!) : BOOL CMyMDIChildWnd::PreCreateWindow( CREATESTRUCT& cs ) { cs.style |= WS_MAXIMIZE; return CMDIChildWnd::PreCreateWindow( cs ); } // PreCreateWindow>> PMFJI, but this is *not* the way to get maximized MDI children. The problem is a defect in the MDI management code inside Windows itself; you will end up with various menu problems if you do it this way. At the moment, the safest way to get maximized MDI children is to 1) Use SetRedraw(FALSE) to turn off updating of either the main frame window or the MDI client window. 2) Create the new MDI child normally. 3) Maximize the new child. 4) Turn updating back on with SetRedraw(). 5) Invalidate whatever needs to be repainted.