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 » Problems with CToolControlBar Collapse All
Subject Author Date
Adrian M Oct 6, 2007 - 1:51 PM

I have a dialog whose code is in a dll. I’m trying to add a toolbar using CToolControlBar but I can’t get the different buttons to show. Here’s what I get:

http://www.amichel.com/toolbar/toolbar.jpg (BTW, how to you insert an image in a post? I tried with but that didn’t work).

Some buttons show when I click the arrow at the right, but they are disabled (this has to do with command handlers though). The first several buttons don’t show here as though there were already on the toolbar.

Second, is it possible to add any controls to this toolbar? For example, I need to add a date/time control with a button to bring up the calendar control - how can I do that?

Thanks,

adrian

Adrian M Oct 10, 2007 - 2:37 PM

It turns out I wasn’t calling the required command manager methods to handle profiles - I’m calling them now and the toolbar is working fine.

Thanks for your help,

Adrian

Technical Support Oct 9, 2007 - 11:24 AM

First of all, please ensure CWnd::RepositionBars( 0, 0xFFFF, 0 ); is invoked after toolbar buttons are initialized. Second, you can send us your dialog’s source code so we will clarify what may be wrong.

Adrian M Oct 8, 2007 - 4:20 PM

I had already done that ( the call to RepositionBars) but it didn’t make any difference. I think my first image was misleading - it was not about the toolbar size or position (see this image http://www.amichel.com/toolbar/toolbar.jpg ), regardless of the toolbar size, no buttons are displayed there. But it looks like internally the code things the buttons are there as I explained in my first message.

Regarding the second question, I already read that article, but I could not experiment with this feature because I couldn’t get any buttons to show. I’ll try that when I get this first issue fixed.

Thanks,

Adrian

Technical Support Oct 8, 2007 - 10:38 AM

A CExtToolControlBar toolbar created inside a dialog cannot be dockable. So your dialog is responsible for positioning such a toolbar near a dialog side. The code CWnd::RepositionBars( 0, 0xFFFF, 0 ); placed at the end of dialog’s OnInitDialog() and OnSize() methods do that and resizes the toolbar so it displays the maximum possible number of buttons.

As for your second question please read the How to insert controls into the toolbar?.

We are sorry but you cannot use the <img> at the moment. We will fix it soon.

Adrian M Oct 8, 2007 - 4:24 PM

I’m reposting as a reply to your message - sorry about the duplicate post.

I had already done that ( the call to RepositionBars) but it didn’t make any difference. I think my first image was misleading - it was not about the toolbar size or position (see this image http://www.amichel.com/toolbar/toolbar.jpg ), regardless of the toolbar size, no buttons are displayed there. But it looks like internally the code things the buttons are there as I explained in my first message.

Regarding the second question, I already read that article, but I could not experiment with this feature because I couldn’t get any buttons to show. I’ll try that when I get this first issue fixed.

Thanks,

Adrian