Partager via


CMFCMenuBar::SaveState

Saves the state of the CMFCMenuBar object to the Windows registry.

virtual BOOL SaveState (
   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 successful; otherwise FALSE;

Remarks

Usually, your application does not call SaveState. The framework calls this method when the workspace is serialized. For more information, see CWinAppEx::SaveState.

The saved information includes the menu items, the dock state, and the position of the menu bar.

Requirements

Header: afxmenubar.h

See Also

Reference

CMFCMenuBar Class

Hierarchy Chart

CMFCMenuBar::LoadState