If you examine the Registry entry for an application that uses a CMainFrame class derived from CFrameWndEx, you will find an entry entitled 'Workspace' which contains (I think) numerous entries releating to the last layout configuration.
I have seen applications that offer the user an option of 'Save Layout'. Is there a simple, direct way to do this ?
Thanks John. My question was poorly thought out but your answer provided me with exactly what I was looking for. I really want a new user who installs the app on his machine to at first boot up a default layout. How best to do that ?
This should be quite easy. It is just a matter of saving layout you need to be used as default by running app, arranging layout and exit.
Get registry values for the workspace key (HKCU.Software.YourString.AppName.Workspace) and have installation program create this key.
There are only 10 types of people in the world: Those who understand binary and those who do not.
Yeah. Thanks. I thought of that. But the Workspace registry entries for an app with a bunch of CDockablePane derived windows are alarmingly extensive. I was hoping that there was a easier way. Guess not.
One possible method would be to :
1 - Set up the app interface in the layout that you wish to be the default, then exit the app
2 - Using the Windows Registry Editor, highlight the 'Workspace' folder of the app in HKEY_CURRENT_USERS/... and Right Click->Export and save as Workspace.reg
3 - Presumably, an installer could use this *.reg file to initialize the default workspace configuration (not sure exactly how - depends upon the installer you're using).
What do you think ?
Last edited by Mike Pliam; September 30th, 2011 at 04:14 PM.