SaveBarState/LoadBarState in CFrameWnd
Georg Breithaupt -- s541518@tfh-berlin.de
Sunday, May 12, 1996
Win95 / VC++ 4.1
In OnCreate Memberfunction of CFrameWnd i call the
Memberfunction LoadBarState( ... ) and in OnClose() i call
SaveBarState to save the Toolbarstate like Position, docked,...
In case of restart the Application, the Toolbars on right place
but in changed order.
Is anybody there with the same problem. What can i do?
Georg
Dan Kirby -- dkirby@accessone.com
Tuesday, May 14, 1996
Can you reproduce the problem with the DOCKTOOL sample? What does a person need to do to reproduce this?
--dan
----------
From: Georg Breithaupt[SMTP:s541518@tfh-berlin.de]
Sent: Sunday, May 12, 1996 8:18 AM
To: 'mfc-l@netcom.com'
Subject: SaveBarState/LoadBarState in CFrameWnd
Win95 / VC++ 4.1
In OnCreate Memberfunction of CFrameWnd i call the
Memberfunction LoadBarState( ... ) and in OnClose() i call
SaveBarState to save the Toolbarstate like Position, docked,...
In case of restart the Application, the Toolbars on right place
but in changed order.
Is anybody there with the same problem. What can i do?
Georg
Robertson David -- davidr@devmail.sps.mot.com
Friday, May 17, 1996
The DockTool example works as we would all desire. However, I think I
have found out why it works, and why most of ours don't.
1) DockTool does not rely solely upon the SaveBarState/LoadBarState
functions. It has a DockControlBarLeftOf function which documents
the fact that MFC will place toolbars one below another in it's
default mode. This function calculates a rectangle where the bar
should be placed, and docks it at those coordinates.
2) Even if you copy this function to your MainFrm, you still won't
get the desired results if you are using ToolBar resources, (and
therefore LoadToolBar), instead of Bitmaps, (and LoadBitmap) for
your toolbars. DockTool uses bitmaps, and as such works well. But,
add one real ToolBar resource and it doesn't.
I would really enjoy having multiple toolbars in my app. But I also
enjoy manipulating my resource as a ToolBar and not a BitMap, as this
makes reorganization extremely easy.
Still watching for the solution to this...
//==================================================//
// David Robertson davidr@devmail.sps.mot.com //
// davidr@inetport.com //
//==================================================//
| Вернуться в корень Архива
|