Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » fail to save and load control bar persistence Collapse All
Subject Author Date
Chun Pong Lau Apr 1, 2008 - 2:27 AM

Dear Support,


When i quit the application, i want to save the existing size and position of the control bars so that the same layout can be retrieved next time i enter the application using the g_CmdManager->SerializeState. However, it fails to restore the layout when i enter the application next time.


 Would you provide a solution for me?


 


Thanks


ChunPong

Technical Support Apr 7, 2008 - 9:40 AM

You can send it to support@prof-uis.com.

Technical Support Apr 5, 2008 - 9:42 AM

Saving or loading to/from the registry happens when you use the CExtControlBar::ProfileBarStateSave()/CExtControlBar::ProfileBarStateLoad() methods. If CExtControlBar::ProfileBarStateLoad() returns false, that means that the ui state has not been previously saved (i.e. when you start your application for the first time). In this case, you should dock your control bars initially yourself.

if( ! CExtControlBar::ProfileBarStateLoad(
   this,
   pApp->m_pszRegistryKey,
   pApp->m_pszProfileName,
   pApp->m_pszProfileName,
   &m_dataFrameWP
   )
  )
 {
  // MAKE THE INITIAL LAYOUT HERE
 }


Chun Pong Lau Apr 6, 2008 - 8:59 AM

Dear Support,


 


       I have aleady done what you suggest in my program with 2.82. However, it just fails to restore the saved controlbars persistence. How can i give you a test project?


 


Thanks


CP