I migrated my MFC MDI application to use the new MFC Feature Pack. I have many toolbars and dockable panes. As far as I understand, the location and size of each of them is saved in the registry when closing the application, and loaded when loading the main frame.
I want to add a feature in my application to reset the layout of the toolbars/panes to the original layout.
I added a menu item whose command is handled in my CWinAppEx
derived class as follows:
CleanState();
LoadState((CMDIFrameWndEx*)m_pMainWnd);
But it does not seem to work properly.
However, if I put the CleanState()
function call before the call to the LoadMainFrame()
, the application loads with the default layout (the one I want).
Is there a way to actually reset the layout of my application AFTER it has been loaded?
Thank you so much.