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 menubar completely? Collapse All
Subject Author Date
Eugene Wineblat Sep 19, 2006 - 9:51 AM

I have
CMainFrame : public CExtNCW< CFrameWnd >
     , public CExtCustomizeSite
{

protected:
CExtMenuControlBar m_wndMenu;
};

In the CMainFrame::OnCreate I hide the menubar
m_wndMenu.ShowWindow ( SW_HIDE );
but when alt+tab my application two times the m_wndMenu appear again.

Question : How to disable menu completely?

Eugene Wineblat Sep 20, 2006 - 8:40 AM

Did you test this method?
Bug still reproduced...

Technical Support Sep 21, 2006 - 6:20 AM

We did the following two experiments with a frame window based sample application which has either re-dockable or non-redockable menu bar:

1) We hide the menu bar, activate another application using the mouse and then activate our application again using ALT+TAB. The menu bar is still invisible.

2) We hide the menu bar, activate another application with ALT+TAB and then activate our test application again using the mouse. The menu bar is visible.

We agree that the second situation is a bug but it is not critical. We will fix it and notify you about this. Thank you.

Eugene Wineblat Sep 20, 2006 - 6:03 AM

some funny information about this problem:
if Prof-UIS variable CExtMenuContolBar is not created than we have a pretty titlebar mixed with standard menu... When NC area is readrawn than we see skinned titlebar, if we click where the the menu should be located than menuitems are painted...
I think Main Menu of frame can’t be set unvisible and GetStyle() & WS_VISIBLE of Main Menu always true...

Technical Support Sep 21, 2006 - 6:15 AM

If you need a menu line consistent with Prof-UIS themes, you should use the CExtMenuControlBar window. It can be created as non-redockable (e.g., see the GLViews sample). In this case, it wll work as the classic menu line that is part of the window non-client area.

Technical Support Sep 20, 2006 - 7:29 AM

CWnd:::ShowWindow() cannot be use for showing/hiding control bars. You should use the CFrameWnd:::ShowControlBar() method instead:

    CFrameWnd * pMainFrame = . . .
    CExtMenuControlBar * pMenuBar = . . .
    BOOL bShow = FALSE; // or TRUE
    pMainFrame->ShowControlBar( pMenuBar, bShow, FALSE );