Professional UI Solutions
Site Map   /  Register


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 General Discussion » "ProfileBarStateSave" not load the saved profile correctly Collapse All
Subject Author Date
Nitin Gahlaut Jun 25, 2010 - 5:32 AM


My application has some grids. I have added some flags (TRUE/FALSE) in the registry  which indicates whether I need to create/show a grid or not.

I am saving these grid/window profile in registry under “HKEY_CURRENT_USER\Software\%sSectionNameCompany%\%sSectionNameProfile%” (i.e. ProfUIS\ Profiles\<ProductName>\ ControlBar\block_0x00000000) using “ProfileBarStateSave” API on closing the application.

Similarly I am reading this profile in “OnCreate” while opening the application from registry using "ProfileBarStateLoad" API.

Now before launching the application if I change the flag TRUE to FALSE (i.e. do not show the grid in next execution) and now if I launch the application then there is no girds on the screen.

When I again restart the application then application displays the grids on menu selection properly.

Can you please suggest me the resolution?  (I need to edit saved profile as per regidtry flags before launching the application.)


Thanks & Regards,

Technical Support Jun 25, 2010 - 10:27 AM

The CExtControlBar::ProfileBarState***() methods require the same control bars created in your main frame window. Otherwise the bar states cannot be loaded successfully. If some control bar with a grid should be optionally invisible for your users, then you can force hide it after state loading and make it inaccessible by setting its CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu property to false.
You can also switch using dynamic resizable control bars (CExtDynamicControlBar) which are controlled by the dynamic bar site (CExtDynamicBarSite). The dynamic bar site supports variable count of dynamic control bars.