Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CFrameWnd::ActivateFrame

Call this member function to activate and restore the frame window so that it is visible and available to the user.

virtual void ActivateFrame( 
   int nCmdShow = -1  
);
nCmdShow

Specifies the parameter to pass to CWnd::ShowWindow. By default, the frame is shown and correctly restored.

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.

void CChildFrame::ActivateFrame(int nCmdShow)
{
   // Create the child frame window maximized
   nCmdShow = SW_MAXIMIZE;

   CMDIChildWnd::ActivateFrame(nCmdShow);
}

Header: afxwin.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.