![]() |
Problems with SavePlacement/LoadPlacement |
Post Reply
|
| Author | |
Staffan V
Newbie
Joined: 29 March 2007 Location: Sweden Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
Topic: Problems with SavePlacement/LoadPlacementPosted: 24 April 2007 at 8:55am |
|
I'm using SavePlacement and LoadPlacement to save (and load) the window placements and I have two problems.
1) hidden windows become visible when I do LoadPlacement, but that's easy to handle (just hide them again after LoadPlacement) 2) the main menu has a menu bar and it seem the size of the window is saved including the height of the menu, but then it's loaded and then extra space is added for the menu even if it already has the space. Very annoying. |
|
![]() |
|
Staffan V
Newbie
Joined: 29 March 2007 Location: Sweden Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 April 2007 at 3:57am |
|
Ok, I solved it by doing
CRect rectOldWin; CRect rectNewWin; GetWindowRect(rectOldWin); LoadPlacement(_T("MyWin")); GetWindowRect(rectNewWin); rectNewWin.bottom = rectNewWin.top + rectOldWin.Height(); rectNewWin.right = rectNewWin.left + rectOldWin.Width(); MoveWindow(rectNewWin, true); |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |