CommandBar_Create()

Examples


The CommandBar_Create() function creates a toolbar based on the specified command list.

Syntax

CommandBar_Create(command_list_tag {, sequence} {, row})

Parameters

command_list_tag – The integer tag value specifying the command list from which the toolbar will be created.

sequence – An optional integer that specifies the relative position of the toolbar being created.

For applications using the multiple-document interface (MDI), the first toolbar in the upper-left corner has the sequence value 1. The toolbar next to it has the value 2, and so on for that row. The toolbars on the next row simply continue the sequence. When using the sequence, you should increment the sequence for each toolbar you create.

For applications using the single-document interface (SDI), the sequence is the horizontal distance of the left edge of the toolbar, measured in pixels from the left edge of the main window.

row – An optional integer that specifies the row that the toolbar will be added to. The value 1 indicates the first row.

Return value

An integer. The value 1 indicates the toolbar was created successfully.

Comments

To use the sequence parameter when adding toolbars, start the value 1 for the first toolbar you add, the value 2 for the second, and so on. A sequence number shouldn’t repeat.

The row parameter specifies the row you want the toolbar to appear in. The value 1 specifies being the first row. When adding toolbars, begin by adding those in the first row (row value 1), then those in the second row (row value 2), and so on.

As the user rearranges toolbars, the sequence and row values adjust automatically.


Documentation Feedback