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

CWinAppEx::LoadState

Reads the application state from the Windows registry.

BOOL LoadState(
   CMDIFrameWndEx* pFrame,
   LPCTSTR lpszSectionName = NULL 
);
BOOL LoadState(
   CFrameWndEx* pFrame,
   LPCTSTR lpszSectionName = NULL 
);
BOOL LoadState(
   COleIPFrameWndEx* pFrame,
   LPCTSTR lpszSectionName = NULL 
);
virtual BOOL LoadState(
   LPCTSTR lpszSectionName = NULL,
   CFrameImpl* pFrameImpl = NULL 
);
[in] pFrame

A pointer to a frame window object. The method applies the state information in the registry to this frame window.

[in] lpszSectionName

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

[in] pFrameImpl

A pointer to a CFrameImpl object. The method applies the state information in the registry to this frame window.

Nonzero if successful; 0 otherwise.

This method loads the state of the application and any state information for a frame window. The loaded information for the frame window is applied to the supplied frame window. If you do not supply a frame window, only the application state information is loaded. The application information includes the state of the CMouseManager Class, CContextMenuManager Class, CKeyboardManager Class, and the CUserToolsManager Class.

The default implementation of CFrameImpl::OnLoadFrame calls LoadState.

The lpszSectionName parameter is not the absolute path for a registry entry. It is a relative path that is added 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

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