Here is some code we are using in 5.3 m110 to add two buttons to existing
toolbars. (We haven't started testing thoroughly, but it appears to work in
6.0 m010, too.)
I have made only minor changes to obscure potentially (if you are an IP
attorney) non-disclosable information, so they should work "out of the box"
assuming you can provide graphics.
Save this in an xml file in your custom folder's ../dialogs directory. It
references two graphics (xui.bmp and exit.bmp) which are 16x16. Those, too,
must be stored in the ../dialogs directory. The command attribute must
contain the reference to the code you want to run. I am calling mine by
packagename::functionname. The x/y coordinates were chosen to place the
buttons at the end of existing toolbars. The toolbar "layout" was too
unpredictable when we tried to insert them at the front of a toolbar. I
exhausted my patience / time available trying to get the Exit button to
dynamically "align right" ... I'm not sure it is possible. Even this
layout, if an author smallifies the Editor window, can collapse creating a
one-icon-wide-toolbar-row containing the xui and/or exit icons.