Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Design Patterns
Expertise: Beginner
Mar 28, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

How to Use the CreateToolbarEx Function

How do you use the CreateToolbarEx function? I want to use it to create dockable tool bars.

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.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date