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 » Menubar query Collapse All
Subject Author Date
Aaron Ellery Nov 27, 2003 - 5:54 AM

First off I just want to say thanks to you Sergiy. I solved all the linker problems thanks to you and I really do appreciate the time you took to help me out.....Much appreciated!!!

I have another question, but this is pretty trivial. I converted the old app’s menu to the office 2003 look, but i can’t get it to show those 3 vertical dots next to the ’File’ Menu option. Without this i cannot move or undock the menu bar. It is painted like the 2003 style perfectly, but i just can’t get the dock control to show. Have added the ’Dockcontrolbar’ and ’EnableDocking’ methods in the OnCreate function but still no change. Any ideas?

Thanks again.

Aaron.

Technical Support Nov 28, 2003 - 12:09 AM

Hi Aaron,

All the CExtControlBar, CExtToolControlBar, CExtMenuControlBar and CExtPanelControlBar classes are use the only one Create() method:

    virtual BOOL CExtControlBar::Create(
		LPCTSTR lpszWindowName,
		CWnd * pParentWnd,
		UINT nID = AFX_IDW_DIALOGBAR,
		DWORD dwStyle =
			WS_CHILD|WS_VISIBLE
			|CBRS_TOP|CBRS_GRIPPER|CBRS_TOOLTIPS
			|CBRS_FLYBY|CBRS_SIZE_DYNAMIC
			|CBRS_HIDE_INPLACE
		); 
If you have specified non-default value of dwStyle parameter without CBRS_GRIPPER flag, then your toolbar, menu bar or panel bar will have no gripper (which is dots in the 2003 style). The resizable bar created without CBRS_GRIPPER style will have no caption with text and buttons. The CBRS_GRIPPER flag affects only on the gripper visibility. It does not disable/enable docking feature of any bar. Any bar may be re-dockable even if it has no gripper/caption.

The gripper/caption is a part of the control bar’s non-client area. Your menu bar may have no gripper if you are using your own class derived from CExtMenuControlBar and handling WM_NCCALCSIZE / WM_NCPAINT there.

To enable bar’s docking feature (i.e. to allow user drag-n-drop this bar) you should invoke:
	m_wndMenuBar.EnableDocking( CBRS_ALIGN_ANY ); 
After that, you should enable docking features of CFrameWnd object:
	if( !CExtControlBar::FrameEnableDocking(this) ) // this is (CFrameWnd*)
	{
		ASSERT( FALSE );
		. . .
	}

Finally, you should dock your bar:
    DockControlBar( &m_wndMenuBar ); 
If you did not invoke m_wndMenuBar.EnableDocking(), then your menu bar will be placed near the frame window border statically (like status bar does).

Please check all my guesses. If the problem persists, then let me take a look a the CMainFrame::OnCreate() method’s code.

Best regards, Sergiy.