Skip to main content

How do I maximize my MDI child ?

· One min read

In CMainFrame class ad the following code.

void CMainFrame::ActivateFrame(int nCmdShow)
{
if (!m_bActivated)
{
m_bActivated = TRUE;
nCmdShow = SW_SHOWMAXIMIZED;
}

CFrameWnd::ActivateFrame(nCmdShow);
}

where m_bActivated is a member variable of your frame object.