Partilhar via


CMFCMenuBar::LoadState

Loads the state of the menu bar from the Windows registry.

virtual BOOL LoadState(
   LPCTSTR lpszProfileName = NULL,
   int nIndex = -1,
   UINT uiID = (UINT)-1
);

Parameters

  • [in] lpszProfileName
    A string that contains the path of a Windows registry key.

  • [in] nIndex
    The control ID for the menu bar.

  • [in] uiID
    A reserved value.

Return Value

TRUE if the method was successful; otherwise FALSE.

Remarks

Use the CMFCMenuBar::SaveState method to save the state of the menu bar to the registry. The saved information includes the menu items, the dock state, and the position of the menu bar.

In most cases your application does not call LoadState. The framework calls this method when it initializes the workspace.

Requirements

Header: afxmenubar.h

See Also

Reference

CMFCMenuBar Class

Hierarchy Chart

CMFCMenuBar::SaveState