The first line in this code snippet uses the CommandToIndex toolbar function to locate the
control number of the ID_COLOR_BLACK button. If you design your toolbar in the order of
colors that you used on the menu, this should be the first control, with a index of 0. It’s
best to use the CommandToIndex function to locate the index of any toolbar button that
you need to alter, just in case it’s not where you expect it to be. This function returns the
index of the toolbar control specified, and you use this as a starting point to specify the
button style of each of the color buttons