CommandBands_GetRestoreInformation (Compact 2013)

3/28/2014

This function retrieves information necessary to restore a band's current state, and places it in a COMMANDBANDSRESTOREINFO structure.

Syntax

BOOL WINAPI CommandBands_GetRestoreInformation(
  HWND hwndCmdBands, 
  UINT uBand, 
  LPCOMMANDBANDSRESTOREINFO pcbri
);

Parameters

  • hwndCmdBands
    [in] Handle to the command bands control's window. This handle is returned when the command bands control is created by the CommandBands_Create function.
  • uBand
    [in] Unsigned integer that contains the zero-based index of the band containing the command bar. Use RB_IDTOINDEX to get the index of the band before passing the index to this function.
  • pcbri
    [out] Pointer to an array of COMMANDBANDSRESTOREINFO structures that will receive information about the band's current state.

Return Value

TRUE indicates success. FALSE indicates failure.

Remarks

Use CommandBands_GetRestoreInformation to save information about the bands in a command bands control before you close the application window. Save the information in the registry, so the bands can be restored to their current state the next time the application is opened. The next time the application is opened, use the values returned in the fStyle and cxRestored fields of the COMMANDBANDSRESTOREINFO structure for the fStyle and cx fields of the REBARBANDINFO structure you pass to the CommandBands_AddBands function. After you have added all the bands to the control, use the RB_MAXIMIZEBAND message to maximize any band whose fMaximized field in the COMMANDBANDSRESTOREINFO structure is set to TRUE.

Requirements

Header

commctrl.h

Library

commctrl.lib

See Also

Reference

Command Bands Functions
CommandBands_AddBands
CommandBands_Create
RB_IDTOINDEX
RB_MAXIMIZEBAND
COMMANDBANDSRESTOREINFO
REBARBANDINFO