The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.



Called by the framework to write the size and location of the main frame window to the registry.

virtual BOOL StoreWindowPlacement(
   const CRect& rectNormalPosition,
   int nFlags,
   int nShowCmd 

[in] nFlags

Flags that control the position of the minimized window and how the operating system switches between a minimized window and a restored window.

[in] nShowCmd

An integer that specifies the show state of the window. For more information about possible values, see CWnd::ShowWindow.

[in] rectNormalPosition

A rectangle that contains the coordinates of the main frame window when it is in the restored state.

Nonzero if successful; 0 otherwise.

By default, MFC automatically saves the position and state of the main frame window before the application exits. This information is stored in the Windows registry under the WindowPlacement key in the default registry location for your application. For more information about the default registry location of your application, see CWinAppEx::GetRegistryBase.

Override this method if you want to store additional information about the main frame window.


Header: afxwinappex.h