|
Seb,
> dragging + shift on a icon of a tool bar produces undesirable effects
> on a exe.
>
> Anybody knows how do I could prevent it?
A quick browse around MSDN shows that it is the CCS_ADJUSTABLE style that
controls this so -
Go to the Toolbar>>defaultWindowStyle method and remove the "|
CCS_ADJUSTABLE" style and save the method. This stops the draggable
behaviour.
Go to Toolbar>>defaultWindowExStyle and remove the "bitOr:
TBSTYLE_EX_DRAWDDARROWS". If you don't do this then the toolbar doesn't
redraw correctly when you recreate it. I keep meaning to ask Blair about
this. I think it causes trouble because the above constant a) Doesn't appear
to exist (MSDN doesn't mention it) and b) has the same value as the EX style
WS_EX_DLGMODALFRAME
Use the ResourceBrowser to open the "Toolbar.Tool bar" resource
- select the toolbar in the view
- select "Mutate View" from the Modify menu
- Select Toolbar in the List and click OK
- Save the modified resource
Using Mutate is the easiest way I've found of reinitializing the resource so
the new style takes effect. For the default, empty Toolbar you could just
delete the existing resource and create another but for populated Toolbars
using mutate avoids having to add all the buttons back.
NB This will change the behaviour of any _new views you create with
Toolbars, _not existing ones - you will have to mutate the resource for each
of those individually.
Ian
|