Saving and retrieving the state of toolbars CToolBar 
Author Message
 Saving and retrieving the state of toolbars CToolBar

I tried to do it using
GetToolBarCtrl().SaveState and GetToolBarCtrl().RestoreState. It didn't
work, the toolbar came back as zero size.

I tried to save its size and location to the registry myself.
So I used GetWindowRect, but that was giving the top left point of the
toolbar not including the titlebar ( I guess )!.
When at restoring I used MoveWindow, the toolbar came back shifting a bit.
And one thing I couldn't find the function that returns to me the dock bar
my toolbar is docked to, is it left, top, right or bottom dock, how can I
find out?

Thanks heaps.



Sat, 03 Sep 2005 14:09:00 GMT  
 Saving and retrieving the state of toolbars CToolBar

--------------------

Quote:

>Newsgroups: microsoft.public.vc.mfc
>Subject: Saving and retrieving the state of toolbars CToolBar
>I tried to do it using
>GetToolBarCtrl().SaveState and GetToolBarCtrl().RestoreState. It didn't
>work, the toolbar came back as zero size.

Use the LoadBarState & RestoreBarState methods in CFrameWnd.

Quote:
>I tried to save its size and location to the registry myself.
>So I used GetWindowRect, but that was giving the top left point of the
>toolbar not including the titlebar ( I guess )!.
>When at restoring I used MoveWindow, the toolbar came back shifting a bit.
>And one thing I couldn't find the function that returns to me the dock bar
>my toolbar is docked to, is it left, top, right or bottom dock, how can I
>find out?

--
Shiva, Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


Tue, 06 Sep 2005 20:42:43 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. saving CToolBar state

2. Saving CToolbar's state, Bug?

3. toolbar: save restore state

4. Saving state of multiple toolbars?

5. Toolbar states not saving and restoring?

6. Saving and Restoring the state of a ToolBar

7. toolbar states: saving-restoring

8. Toolbar - Load/Save dock states

9. Saving Multiple Toolbar States

10. Saving/Restoring multiple toolbar states

11. CToolbar--How to set the HOT state?

12. CToolBar with two state buttons

 

 
Powered by phpBB® Forum Software