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 » Show / Hide CExtControlBar Collapse All
Subject Author Date
Massimo Germi Apr 29, 2006 - 6:20 AM

hi,

I have application that can switch to Full Screen mode and restore in normal state. In some situation automatically the application pass in full screen mode.
When I work in full screen mode I don’t wont some CExtControlBar object, to hide its I use ShowControlBar(...).
ShowControlBar method work only if the CExtControlBar object is docking or floating but when AutoHide is abilitated it daoesn’t work.
The only method I found is keep in memory the state of any CExtControlBar and if is in AutoHide mode I temporaly dock and then hide, I don’t think is the beauty method.

Could you have any suggestion to Show/Hide CExtControlBar when is in AutoHide mode? When the CExtControlBar hided is restored it have to return in AutoHide mode.

TX a lot for any response.

Technical Support Apr 30, 2006 - 7:35 AM

If you need to hide a simple control bar (not the dynamic control bar), you can do this with the following code:

CExtControlBar * pBar = . . .
CMainFrame * pMainFrame = . . .
    if( pBar->AutoHideModeGet() )
        pBar->AutoHideModeSet( false, false, true, true );
    else if( pBar->IsVisible() )
        pMainFrame->ShowControlBar( pBar, FALSE, FALSE );
The FullScreenState sample supports two independent control bar states for the normal and full screen modes. This allows you to avoid tracking the state of each bar. As a result, the end user can set up the layout of control bars in each mode independently from each other.

Massimo Germi May 1, 2006 - 7:11 AM

OK,
this work fine if I have bar objects created in CMainFrame window, but it seems does not work if I create a bars in CChildFrame.

Is a problem of my code or I have to use another method?

Thanks a lot

Technical Support May 1, 2006 - 12:16 PM

We cannot confirm that this does not work. The code snippet in our previous message in this thread works for the resizable control bar inside any kind of CFrameWnd window. If your bar is in the MDI child frame window:

CExtControlBar * pBar = . . . // bar that is inside your child frame
CMDIChildWnd * pChildFrame = . . . // your CChildFrame - NOT main frame!
    if( pBar->AutoHideModeGet() )
        pBar->AutoHideModeSet( false, false, true, true );
    else if( pBar->IsVisible() )
        pChildFrame->ShowControlBar( pBar, FALSE, FALSE );
Of course, if the problem persists, you can always send us a project that demonstrates the problem so we can help you.