saving CToolBar state 
Author Message
 saving CToolBar state

Hi,
I'm looking for tips on how to properly save and restore the
states (window placement) of the toolbars in my app. Using
SetWindowPlacement()/GetWindowPlacement() doesn't seem to
work that well for me - the docking states don't seem to be
preserved. How can I find out which side of the main frame a toolbar
is docked to?

steve



Wed, 03 Jul 2002 03:00:00 GMT  
 saving CToolBar state
The CFrameWnd and CDockFrame class provide the functions you are looking for

To load the state (for instance, at the end of the OnCreate function of the
frame):
 CDockState state;
 GetDockState(state);
 state.LoadState("Settings\\State");
 SetDockState(state);

To save the state (for instance, at the begining of the OnDestroy function
of the frame):
 CDockState state;
 GetDockState(state);
 state.SaveState("Settings\\State");

Vincent Jacquet


Quote:
> Hi,
> I'm looking for tips on how to properly save and restore the
> states (window placement) of the toolbars in my app. Using
> SetWindowPlacement()/GetWindowPlacement() doesn't seem to
> work that well for me - the docking states don't seem to be
> preserved. How can I find out which side of the main frame a toolbar
> is docked to?

> steve



Thu, 04 Jul 2002 03:00:00 GMT  
 saving CToolBar state
Thanks Vincent.
Steve


Quote:
> The CFrameWnd and CDockFrame class provide the functions you are looking
for

> To load the state (for instance, at the end of the OnCreate function of
the
> frame):
>  CDockState state;
>  GetDockState(state);
>  state.LoadState("Settings\\State");
>  SetDockState(state);

> To save the state (for instance, at the begining of the OnDestroy function
> of the frame):
>  CDockState state;
>  GetDockState(state);
>  state.SaveState("Settings\\State");

> Vincent Jacquet



> > Hi,
> > I'm looking for tips on how to properly save and restore the
> > states (window placement) of the toolbars in my app. Using
> > SetWindowPlacement()/GetWindowPlacement() doesn't seem to
> > work that well for me - the docking states don't seem to be
> > preserved. How can I find out which side of the main frame a toolbar
> > is docked to?

> > steve



Thu, 04 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Saving and retrieving the state of toolbars CToolBar

2. Saving CToolbar's state, Bug?

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

4. CToolBar with two state buttons

5. CToolBar selection state drawing problem!!

6. CToolBar button click focus state problem

7. Saving/Restoring CToolBar's old position

8. How to save CToolBar object location?

9. Window state save/restore

10. Saving state and returning from any location in program

11. Saving the State of the Processor

12. save outline state

 

 
Powered by phpBB® Forum Software