CommandBands_GetRestoreInformation

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

At a Glance

Header file: Commctrl.h
Windows CE versions: 2.0 and later

Syntax

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

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 Values

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've 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.

See Also

CommandBands_AddBands, CommandBands_Create, COMMANDBANDSRESTOREINFO, RB_IDTOINDEX, REBARBANDINFO