Question:
How do you use the
CreateToolbarEx
function? I want to use it to create dockable tool bars.
Answer:
With CreateToolBarEx
, you're walking into real low-level stuff that will
require that you create an array of TBButtons, add bitmap images to them,
and create a window proc command handler. It's a lot of work to get this
working properly.
Let me ask you this: Is your toolbar application-specific, or are you trying
to create some type of global toolbar? If it's application specific, you can
construct a form, override its CreateParams
method and give it a style of
WS_CHILD
. You can also remove its border and position it so that it's
"docked" on the side of the parent form that you choose.
As far as creating a child form is concerned, refer to
an article I wrote on creating a child form. It's an in-depth
discussion of the various things you need to consider for constructing this
type of object in Delphi.