This project demonstrates how to host a vbAccelerator Toolbar control outside a Rebar.
Whilst you don't have to add a toolbar to a rebar, you will find that the toolbar only
draws correctly outside if it doesn't have flat buttons:
Comment-on dit "Display Bug "?
The problem is that a flat toolbar has a specialised drawing routine to allow it to
draw transparently. It sends a WM_ERASEBKGND message whenever it wants its own backdrop
to be redrawn. If the host of the toolbar doesn't respond to this, the background is
never updated and you get to see whatever was behind the toolbar at the time, as you
can see from the picture above!
This is easily solved using the inbuilt Toolbar Host control. This control subclasses
the WM_ERASEBKGND message and in response clears its own background. In addition to this,
it also includes automatic resizing code suitable for building wrappable toolbar displays,
and can accept other VB controls too, such two additional combo boxes in this demo.
The code also demonstrates how to set up the revolting tangerine coloured background to the control
as shown in the picture!