CFrameWnd::ActivateFrame
virtualvoidActivateFrame(intnCmdShow**=-1);**
Parameters
nCmdShow
Specifies the parameter to pass to CWnd::ShowWindow. By default, the frame is shown and correctly restored.
Remarks
Call this member function to activate and restore the frame window so that it is visible and available to the user. This member function is usually called after a non-user interface event such as a DDE, OLE, or other event that may show the frame window or its contents to the user.
The default implementation activates the frame and brings it to the top of the Z-order and, if necessary, carries out the same steps for the application’s main frame window.
Override this member function to change how a frame is activated. For example, you can force MDI child windows to be maximized. Add the appropriate functionality, then call the base class version with an explicit nCmdShow.
Example
void CChildFrame::ActivateFrame(int nCmdShow)
{
// Create the child frame window maximized
nCmdShow = SW_MAXIMIZE;
CMDIChildWnd::ActivateFrame(nCmdShow);
}