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 General Discussion » Regarding customization dialog Collapse All
Subject Author Date
Trupti Kasvala Jan 21, 2009 - 6:26 AM

Hello sir,


I want to reset all the controlbars all together.How is it possible?


Can this feature added to customization dialog?


Waiting for your early reply.


Trupti

Technical Support Jan 22, 2009 - 12:39 PM

The CMainFrame::OnCreate() method typically contains the following code:

if( ! CExtControlBar::ProfileBarStateLoad( . . . ) )
{
            // dock all the bars initially
            DockControBar( &m_wndMenuBar, . . . );
            DockControBar( &m_wndToolBar, . . . );
            . . .
}
This code is invoked after all the bars are already created. So, the main frame window tries to load the state of all the bars and, if it was not loaded successfully, it docks all the bars initially. You can extract the code which docks all the bars initially into new method and invoke it from the CMainFrame::OnCreate() method. You can invoke this new method when you need to reset positions of all the bars.

The next step, is inserting a new property page into the Customize property sheet. You need to create new child visible dialog template resources, the create the CPropertyPage-based class for it using Visual Studio wizard, then replace base class name to the CExtResPP class. Then you should override the CExtCustomizeSite::OnCreateCustomizeForm() virtual method in your main frame class, copy source code from original method and insert creation code for one additional dialog page.