Dockable panes created in CChildFrame not visible the second time the app. starts.

Posted by Nijenhuis on Stack Overflow See other posts from Stack Overflow or by Nijenhuis
Published on 2010-03-09T00:58:53Z Indexed on 2010/03/09 1:06 UTC
Read the original article Hit count: 276

Filed under:
|

Hi,

I have created some dockable panes in CChildFrame::OnCreate() The first time i start the application they are shown. The second time i start the application they are created but the splitterwindows are completly against the sides of the clients area (bottom and right), so not visible. So i have to use the mouse to pull the splitters into the clientarea so that the dockable windows become visible again. If i do File->New in my app a new client window is created and showing the dockable windows as they should be. I Think this has something to do with saving the windows layout in the registry, because if i change SetRegistryKey(_T("61sakjgsajkdg")); in the CWinApp derived class of my app. and rerun they are shown again the first time. (but not the second time i restart the app). How can i save the layout of those dockable windows as well, so if i restart my app. they are visible ? Or else how do i prevent my app. of overwritting the window layout with the one previously saved. Something to do with LoadCustomState() and SaveCustomState() ?, i could no find any info on howto implement those methods. I have here a link to the demo project to demonstrate what i mean:

http://www.4shared.com/file/237193472/c384f0f6/GUI60.html

Could someone tell me how to show those dockable windows in my CChildFrame class the second time the app starts?

© Stack Overflow or respective owner

Related posts about mfc

Related posts about mfc-feature-pack