Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

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

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_Createfunction.

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 COMMANDBANDSRESTOREINFOstructures that will receive information about the band's current state.

Return Value

TRUE indicates success. FALSE indicates failure.

Remarks

Use CommandBands_GetRestoreInformationto 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 fStyleand cxRestoredfields of the COMMANDBANDSRESTOREINFOstructure for the fStyleand cxfields of the REBARBANDINFOstructure you pass to the CommandBands_AddBandsfunction. After you have added all the bands to the control, use the RB_MAXIMIZEBANDmessage to maximize any band whose fMaximizedfield in the COMMANDBANDSRESTOREINFOstructure is set to TRUE.

Requirements

Header commctrl.h
Library commctrl.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also