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 » Toolbar in dialog Collapse All
Subject Author Date
Paolo Giustinoni May 13, 2006 - 11:27 AM

How can I add a CExtToolControlBar in a CExtResizableDialog?

Thanks, Paolo

Technical Support May 13, 2006 - 12:49 PM

It seems the FAQ How to put a toolbar on the dialog in the control bar? is what you are looking for.

Paolo Giustinoni May 13, 2006 - 5:14 PM

Thanks for the answer..
My problem is the function RepositionBars().. My application is dialog-based, and I have no control that should fit the rest of the dialog space.
So what can be the third parameter of this function?

Thanks, Paolo

Technical Support May 15, 2006 - 1:40 AM

If you use the CWnd::RepositionBars() API with dialogs, you should specify zero in the third parameter. The third parameter is the dialog control identifier of the window that occupies the rest area, free of any bars.

Paolo Giustinoni May 15, 2006 - 3:36 AM

Thanks, it works.
Another question: is it possible to create a non standard toolbar (e.g. with 44x40 size buttons) in a dialog box?
And if it’s possible, how?

Thanks in advance.
Paolo

Technical Support May 16, 2006 - 9:10 AM

Just create a toolbar bitmap with 44x40 size images and a toolbar in the resources that uses buttons of the 44x40 size. You have to edit the *.rc file manually. Here is the IDR_TOOLBAR_BIG_TRUE_COLOR toolbar declaration from the FunnyBars sample:

IDR_TOOLBAR_BIG_TRUE_COLOR TOOLBAR MOVEABLE PURE  44, 40

BEGIN

    BUTTON      ID_TRUE_FILE_NEW

    BUTTON      ID_TRUE_FILE_OPEN

    BUTTON      ID_TRUE_FILE_FAVORITES

    SEPARATOR

    BUTTON      ID_TRUE_FILE_ADD

    BUTTON      ID_TRUE_FILE_EXTRACT

    BUTTON      ID_TRUE_FILE_VIEW

    SEPARATOR

    BUTTON      ID_TRUE_FILE_CHECK_OUT

    BUTTON      ID_TRUE_FILE_WIZARD

END
Please note that you need to increase the toolbar height in the dialog editor so that it has enough room for big images.