Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize


Writes the application state to the Windows registry.

virtual BOOL SaveState(
   LPCTSTR lpszSectionName = NULL,
   CFrameImpl* pFrameImpl = NULL 
BOOL SaveState(
   CMDIFrameWndEx* pFrame,
   LPCTSTR lpszSectionName = NULL 
BOOL SaveState(
   CFrameWndEx* pFrame,
   LPCTSTR lpszSectionName = NULL 
BOOL SaveState(
   COleIPFrameWndEx* pFrame,
   LPCTSTR lpszSectionName = NULL 

[in] lpszSectionName

A string that contains the relative path of a registry key.

[in] pFrameImpl

A pointer to a CFrameImpl object. This frame is saved to the Windows registry.

[in] pFrame

A pointer to a frame window object. This frame is saved to the Windows registry.

True if successful; false otherwise.

This method saves the state of the application and any state information for the provided frame window. If you do not provide a frame window, the method only saves the application state. The application information includes the state of the CMouseManager Class, CContextMenuManager Class, CKeyboardManager Class, and the CUserToolsManager Class.

The lpszSectionName parameter is not the absolute path for a registry entry. It is a relative path that is appended to the end of the default registry key for your application. To get or set the default registry key, use the methods CWinAppEx::GetRegistryBase and CWinAppEx::SetRegistryBase respectively.

Header: afxwinappex.h

© 2015 Microsoft