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 » How to create a hidden floating CExtDynamicControlBar? Collapse All
Subject Author Date
Hans Bergmeister Feb 17, 2007 - 8:34 AM

Hello,

we want to create a CExtDynamicControlBar, that is initially hidden and floating.

When FloatControlBar() is being called after creating the bar with BarAlloc(), then the bar becomes temporarily visible. When FloatControlBar() is not called, then the bar is docked, when it is made visible later.

How can we create an initially hidden, floating bar?

Technical Support Feb 17, 2007 - 1:12 PM

It seems you mean the case when your application runs for the first time on the end user machine. Here is how you can easily achieve this:
1) Run your application and make all control bars docked and/or floating so that they have the desirable layout (the one the user should see when your application starts for the first time). Hide some control bars and containers if needed.

2) Exit your application. The layout and state of control bars are now saved either to the registry or to a file.

3) Distribute the .reg file or the file with saved ui state to target machines (inside your installer).

Hans Bergmeister Feb 18, 2007 - 3:46 AM

Many thanks for the reponse.

With "classic" MFC and CControlBar objects one just had to create the bar and call FloatControlBar without calling ShowControlBar.

As far as I understand your response this can be now easily achieved with Prof-UIS and CExtDynamicControlBar by replacing this single line of code by a procedure, that creates a .reg or file, which contains the desired status of the bar and by extending the installation procedure of the application to include this .reg or file and to install this file on the target computer of all end users. Many thanks for pointing me to this solution, which is really easy compared to classic MFC.

Technical Support Feb 19, 2007 - 10:44 AM

You should not create any special code in your project: simply run your app, then run regedit and export the folder with ui settng to a .reg file.

Hans Bergmeister Feb 19, 2007 - 10:59 AM

Hello,

>>
You should not create any special code in your project
<<
We have to create a dynamic number of bars at runtime, that must be hidden in certain cases. Sounds funny, but is a consequence of our current design, which worked flawlessly with plain MFC.