CWinAppEx::LoadWindowPlacement

Called by the framework when it loads the size and location of the main frame window from the registry.

virtual BOOL LoadWindowPlacement(
   CRect& rectNormalPosition,
   int& nFlags,
   int& nShowCmd 
);

Parameters

  • [out] rectNormalPosition
    A rectangle that contains the coordinates of the main frame window when it is in the restored position.

  • [out] nFlags
    Flags that control the position of the minimized window and how the operating system switches between a minimized window and a restored window.

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

Return Value

Nonzero if successful; 0 otherwise.

Remarks

By default, MFC automatically loads the previous position and state of the main frame window when the application starts. For more information about how this information is stored in the registry, see CWinAppEx::StoreWindowPlacement.

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

Requirements

Header: afxwinappex.h

See Also

Reference

CWinAppEx Class

Hierarchy Chart

CWinAppEx::StoreWindowPlacement