Destroying a Toolbar 
Author Message
 Destroying a Toolbar

Hi,

I have created a toolbar that is specific to a view(I have created in
OnCreate of the view) and dockable. The user can close the toolbar by
docking it and then clicking on the cross button. I have made a menu
to restore the toolbar. I want to know what function should I use to
restore the toolbar?
Also what is the event generated when I close the toolbar?
Can my view handle the generated event?
Do I have to use CreateEx and LoadToolbar to restore the toolbar
again?
How do I destroy the toolbar programatically without the user clicking
on the cross button?
Any help would be welcomed



Sat, 17 Dec 2005 22:19:42 GMT  
 Destroying a Toolbar
Don't destroy it each time it is hidden. Simply hide/show it as needed. A
toolbar by default has CFramewnd as its parent and then you use
ShowControlBar to hide/show it. I am not sure what you did to make a view as
its parent but docking will not work for a non Cframewnd derived object as
the parent of a CControlBar; so I suspect you have CFramewnd in the
hierarchy somewhere.

--
Ajay Kalra [MVP - VC++]


Quote:
> Hi,

> I have created a toolbar that is specific to a view(I have created in
> OnCreate of the view) and dockable. The user can close the toolbar by
> docking it and then clicking on the cross button. I have made a menu
> to restore the toolbar. I want to know what function should I use to
> restore the toolbar?
> Also what is the event generated when I close the toolbar?
> Can my view handle the generated event?
> Do I have to use CreateEx and LoadToolbar to restore the toolbar
> again?
> How do I destroy the toolbar programatically without the user clicking
> on the cross button?
> Any help would be welcomed



Sun, 18 Dec 2005 06:09:44 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How do I delete/destroy a toolbar?

2. Toolbar into another Toolbar?

3. Toolbar button shows up after toolbar is moved????

4. Toolbars in toolbars

5. How top place an AVI within the toolbar, just as one of those toolbar buttons

6. Save and Load Toolbar Status : size of toolbar

7. Q: How to dock a Toolbar next to the First Toolbar

8. Q: toolbar customdraw, no frame around toolbar

9. Stupid Toolbar Tricks question (move toolbar left?)

10. Toolbars - How to position multiple toolbars

11. How to dock a toolbar beside the main toolbar

12. Tall toolbar among short toolbars

 

 
Powered by phpBB® Forum Software