Share via


Creating, Moving, and Editing Toolbar Buttons

Home Page (Toolbar Editor)OverviewHow Do I ... Topics

You can easily create, move, copy, and edit toolbar buttons. You can connect toolbar buttons to code using ClassWizard while the Toolbar editor is active.

By default, a new or blank button is displayed at the right end of the toolbar. You can move this button before editing it. When you create a new button, another blank button appears to the right of the edited button. When you save a toolbar, the blank button is not saved.

What do you want to do?

Create a new toolbar button

Move a toolbar button

Copy buttons from a toolbar resource

Delete a toolbar button

Insert a space between buttons on a toolbar resource

Close up a space between buttons on a toolbar

Edit the property page of a toolbar

To create a new toolbar button

  • Assign an ID to the blank button at the right end of the toolbar. Open the property page on that toolbar button to edit the ID box.

    –or–

  • Select the blank button at the right end of the toolbar, and begin drawing. A default button command ID is assigned (ID_BUTTON<n>).

To move a toolbar button

  • Drag the button that you want to move to its new location on the toolbar.

To copy buttons from a toolbar

  1. Hold down the CTRL key.

  2. Drag the button to either its new location on the toolbar or to a location on another toolbar.

To delete a toolbar button

  • Select the toolbar button, and drag it off the toolbar.

To insert a space between buttons on a toolbar

  1. To insert a space before a button that is not followed by a space, drag the button to the right or down until it overlaps the next button about halfway.

  2. To insert a space before a button that is followed by a space and retain the space following the button, drag the button until the right or bottom edge is just touching the next button or just overlaps it.

  3. To insert a space before a button that is followed by a space and close up the following space, drag the button to the right or down until it overlaps the next button about halfway.

To close up a space between buttons on a toolbar

  • Drag the button on one side of the space toward the button on the other side of the space until it overlaps the next button about halfway.

    If there is no space on the side of the button that you are dragging away from, and you drag the button more than halfway past the adjacent button, the Toolbar editor also inserts a space on the opposite side of the button that you are dragging.