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 » CExtMenuControlBar and system menu buttons Collapse All
Subject Author Date
Moby Dick Jun 10, 2005 - 3:16 AM

Hello all,


I’ve created a CExtMenuControlBar derivated class that inserts a CExtComboBox at the right of the menubar (after the last menu == help menu).


I don’t know how to calculate the size of the system buttons (close, restore and minimize), nor how to retrieve if a child window is open or not, to replace my combobox on a MDI frame window.


How can I retrieve the vertical position of the menubar (to hide the combobox at this position) or determine if my combobox is larger than the space between the help menu and the right border ?


Can you help me for this please ?


Thanks a lot.

Technical Support Jun 11, 2005 - 9:40 AM

To detect whether the MDI main frame window has an open MDI child window, just call its CMDIFrameWnd::MDIGetActive() method which returns a pointer to the active MDI child frame window or NULL. It is possible to resize the combo-box button between the MDI system icons button (an instance of the CExtBarMdiRightButton class) and the previous menu bar’s button. It is also possible to hide your combo box button depending on some condition. Please note that, by default, the menu bar becomes miltiline automatically when all its buttons cannot be organized into a single row. The solution of your task is based on overriding the CExtMenuControlBar::_RecalcPositionsImpl() internal virtual method in your CExtMenuControlBar-derived class. This method should invoke parent’s method and resize the combo-box button to fit all the available space or hide it.