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 » How to hide a docked controlbar Collapse All
Subject Author Date
Olaf Baeyens Mar 19, 2003 - 3:32 AM

I want a dialog to be docked default to the left side, but not active in such a way that you have to make it visible using the menu item.

The code below makes the dialog hidden, but it gives you still the button to press in the AutoHide frame. I want no auto hide frame at all during the very first time I start this program on a machine.

The first time I press the menu item to display the dialog box, it should be docked at the left with the correct size of the original dialog box or at least stretched to the bottom. Some other dialogs must be docked to the right, bottom or top...


    m_wndLightsBarDlg.DockControlBar(AFX_IDW_DOCKBAR_LEFT, 1, this, false);
    m_wndLightsBarDlg.AutoHideModeSet( true, false, false, true );
    ShowControlBar( &m_wndLightsBarDlg, FALSE, TRUE );

Any tips?

Sergiy Lavrynenko Mar 21, 2003 - 12:38 AM

Dear Olaf,

This code will hide any resizable bar (pBar) in any state:
if( pBar->AutoHideModeGet() )
pBar->AutoHideModeSet( false, false, true, true );
ASSERT_VALID( pBar->m_pDockSite );
pBar->m_pDockSite->ShowControlBar( pBar, FALSE, FALSE );

Best regards,
Sergiy.