Customizing ToolBar objects


When customizing a ToolBar object, you will see the following window:



You have the possibility to add a bitmap resource so that its images might be associated to tool bar buttons. If so, the bitmap file must be an existing resource in the Image Table of the Resource Editor. All bitmap resources being there will be available in the tool bar customizing window. After adding a bitmap resource for a tool bar, Easy Code calculates the number of images by dividing the whole bitmap file width by the image width (16 pixels by default). If you change the image or button sizes, you will have to specify the number of images and the image and button sizes for the tool bar buttons to display their image properly. When referring to button or image indexes, take into account that they are one-based (both, first button and first image are number 1). Images associated to buttons with a Separator style have no effect, as they are never displayed (their image index should be 0).

REMARKS: The index number for each button in a tool bar is also its IDentifier. At run time, this IDentifier is the one sent to the tool bar "owner window" when a button is clicked, through the WM_COMMAND message (see the MDI example coming with Easy Code).