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 » Insert a complete dialog into a toolbar Collapse All
Subject Author Date
Wilhelm Falkner Sep 5, 2006 - 1:51 AM

Is it possible, to insert a complet dialog into a toolbar? I tried InsertSpecButton, but without success. The dialog should have an ownerdraw button (picture, changing during prog execution), static texts (has to be painted in different colors, according state of prog) and some static texts. These dialogs has to be created during runtime, that means, the number is not fixed.
TIA
Willi

Technical Support Sep 5, 2006 - 11:12 AM

You can use the CExtPanelControlBar class which is similar to MFC’s CDialogBar. The CExtPanelControlBar class implements a toolbar-like window, which owns only one child window and whose size that is determined by the size of this child window. In most cases the panel control bar is used as a container for a dialog.

In the FixedSizePanels sample application you can find that the m_wndPanelDialog property of CMainFrame, which is created in CMainFrame::OnCreate(), is an instance of the CExtPanelControlBar class. The m_dlgForPanelDialog property of the main frame is a child dialog whose parent window is m_wndPanelDialog.

Suhai Gyorgy Sep 5, 2006 - 3:09 AM

Try checking CExtToolControlBar::SetButtonCtrl() method. Second parameter is a CWnd *, so I’d guess it can take CDialog as well.
And also in this subject it’s good to read FAQ How to insert controls into the toolbar?