How to exclude the MFC from the docking state

Is there an easy way to exclude the dashboard from the dock state saved in the MFC frame window?

We have a dock bar whose visibility is controlled by some other state, and loading the dock state interferes with the desired behavior.

0


a source to share


2 answers


You will have to dock / undock a specific line after you call on "LoadBarState" with DockControlBar or FloatControlBar (whichever other state is).

Another (more hackish) option is to delete a specific settings registry key after your call to "SaveBarState". The dock state is saved here:



HKLM \ Software <i> \ CompanyName \ ApplicationName

There he has a key for each control panel.

0


a source


Revert them and force them to return FALSE



virtual BOOL LoadState(LPCTSTR lpszProfileName = NULL, int nIndex = -1, UINT uiID = (UINT) -1);

virtual BOOL SaveState(LPCTSTR lpszProfileName = NULL, int nIndex = -1, UINT uiID = (UINT) -1);

      

+2


a source







All Articles