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 display an Hide CExControlbar Collapse All
Subject Author Date
Yi Zheng Dec 20, 2006 - 9:52 AM

I call AutoHideModeSet to enable auto hide mode. I set 4 CExControlbars in auto hide mode.
But I want one of them display when application start. How to display the CExControlbar just like the mouse click the title button?
I have try the Cwn:ShowWindow , but it seems create another window to show and cannot Autohide.

Thanks
BR
Zheng Yi

Technical Support Dec 21, 2006 - 12:00 PM

You can send the WM_COMMAND message to the main frame window and specify the bar’s identifier in WPARAM message parameter:

CMainFrame * pMainFrame = . . .
CExtControlBar * pBar = . . .
    pMainFrame->PostMessage( WM_COMMAND, WPARAM( pBar->GetDlgCtrlID() ) );


Suhai Gyorgy Dec 21, 2006 - 2:03 AM

Somewhere in Prof-UIS FAQ I read this: "If you have dockable toolbars in a CFrameWnd-based application, do not use ShowWindow of CWnd because, when a toolbar gets displayed/hidden, this affects the layout of other windows. Just use CFrameWnd::ShowControlBar instead".
Although this sentence talks about toolbars, I think the same goes for the dockable controlbars as well. So just try using ShowControlBar( pMyControlBar, true, true);