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 » Toolbar in a dialog Collapse All
Subject Author Date
Roberto Manes Jun 26, 2009 - 3:30 AM

I’m facing the following problem. I have one menu and two toolbars positioned at the top of a dialog bar. The first problem I’m facing is that I cannot position the second toolbar beside the first one. Also I noticed that when I click on some toolbar buttons (it happens only on a couple of buttons ???!!! ) the menu in the dialog bar changes its state from enabled to disabled, that is, even though it’s not greyed I cannot get access to any of the available functions. Just to explain better this scenario all the functions available through the menu and the toolbars are also available from the main menu of the mainframe. The application is a multidocument application. The dialog including the menu and the toolbars is a popup dialog. Here follows the PretranslateMessage() method of the dialog. thanks in advance for your help.



BOOL CUIDialogColorways::PreTranslateMessage(MSG* pMsg)


{



if( m_wndMenuBar.TranslateMainFrameMessage(pMsg) )



 



return TRUE;if( m_hAccelTable != NULL && WM_KEYFIRST <= pMsg->message && pMsg->message <= WM_KEYLAST)if( ::TranslateAccelerator( m_hWnd, m_hAccelTable, pMsg ) )return TRUE;

return CExtResizableDialog::PreTranslateMessage(pMsg);


}



 


 


{


 


 


}

Technical Support Jun 26, 2009 - 1:12 PM

The toolbars created inside any non-frame window can behave only like a classic status bar: they always occupy one row per toolbar. You should mix your two toolbars into one toolbar.

There is an important limitation related to the CExtMenuControlBar class: each menu bar window must be the only one menu bar in scope of one command profile of the Prof-UIS command manager.

The main frame window in your application initializes some named command profile and creates menu bar. The dialog window which also has its own menu bar should initialize its own command profile with unique name. You should invoke the CExtCmdManager::ProfileSetup() method in dialog’s OnInitDialog() virtual method and the CExtCmdManager::ProfileDestroy() method in dialog’s OnOK() and OnCancel() virtual methods.

If your code creates more than one menu bar in scope of one command profile, then both menu bars will work incorrectly.