CommandBands_GetRestoreInformation

The CommandBands_GetRestoreInformation 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 pcbr);

At a Glance

Header file: Commctrl.h
Platforms: H/PC
Windows CE versions: 2.0 and later

Parameters

hwndCmdBands
The command bands control's window handle. This handle is returned when the command bands control is created by the CommandBands_Create function.
uBand
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
Pointer to an array of COMMANDBANDSRESTOREINFO structures that will receive information about the band's current state.

Return Values

Returns TRUE on success and FALSE on 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