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 » Show/hide multiple docked dynamic bars, and retain all their original size/position? Collapse All
Subject Author Date
Ed Nafziger Dec 14, 2009 - 7:04 PM


I have an MDI frame window with multiple dynamic bars docked on the sides.

I want to show/hide of all the dynamic bars with a single hot-key, and when made visible, they are all at their original size/position.

The problem is, hiding them one at a time, the remainder bars will automatically resize to fill the available space, so that when those remainder bars are hidden they are profiled at the wrong size/position.

I haven’t found a way to show/hide them all at the same time, so that all go back to their original size/position.

I haven’t found a container that allows multiple dynamic bars to be docked into it, so I can just show/hide the container. All the control bars I see in the help file say " designed for holding a single window". And I haven’t seen any samples with multiple dynamic bars inside another bar.

Is there a way to show/hide multiple dynamic bars, or is there a container capable of multiple dynamic bars, so I can show/hide them and retain all their original positions?

Thanks.




Technical Support Dec 15, 2009 - 1:46 PM

The FullScreenState sample application implements approximately what you need. It supports two bar states: normal state and full screen state. All the bars are initially visible in the normal state and most of bars are initially hidden in the full screen state. In simple words, your application should save the bar state before hiding all the bars and restore bar state instead of remembering list of bars to show back.

Ed Nafziger Dec 15, 2009 - 12:04 PM

I found what I was looking for in the MDI_DynamicBars sample, and finally got it working.

CMainFrame::OnPersistenceLoadFromFile_Resizable()
CMainFrame::OnPersistenceSaveToFile_Resizable()

The problem was the bars were already profiled with the incorrect positions. I had to delete the registry entry:
HKEY_CURRENT_USER/Software/[CompanyName]/[ProductName]