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 ExtControlBar problem. Collapse All
Subject Author Date
james Nov 3, 2003 - 12:28 PM

Hi there. I have a problem in a system im developing. I have put a toolbar in a CFormView derived class and put it in a CExtControlBar. Everything works fine but when I float the bar all toolbar buttons become disabled as there was no function mapped to it. Does anybody have an idea of how to solve this problem?

Thanks.

Olaf Reusch Jun 9, 2007 - 4:46 PM

I have a problem like this. I have a Toolbar in a derived CForm, but ON_COMMAND handler doesnt work, only the ON_UPDATE_COMMAND_UI handler receives a message. Can you send me a sample project please.

Technical Support Jun 11, 2007 - 2:07 AM

If you are using control bars (a toolbar is also kind of control bar) in any kind of window that is not a MFC frame window, in the C++ class which implements this window, you should invoke the following code at initialization and in the WM_SIZE message handler:

CWnd::RepositionBars( 0, 0xFFFF, 0 );
You can see how CWnd::RepositionBars() is invoked in the ProfUIS_Controls sample where several dialogs have child toolbar windows.

Sergiy Lavrynenko Nov 3, 2003 - 4:18 PM

Hi James,

The form view window can be compared with the child dialog window. If you have any controls inside your form view which send WM_COMMAND messages (button, toolbar) - you should handle this messages in your form view class (NOT in the frame window class). First of all, please verify this. If I made invalid guess - please provide me with more details about your project.

Best regards, Sergiy.

james Nov 3, 2003 - 4:58 PM

Hi Sergiy, thanks for your reply.

I have already done what you said. Maybe I have not made myself clear in the last message. Ill try to explain it better. When the control bar where the form view is in is docked, the toolbar buttons are processed by the message map I declared inside my derived FormView class. This is the desired behavior. The problem appears when I float the control bar. When it is floating no buttons get processed by the message map. I hope I made myself clear this time. Thanks very much for your help on this.

Sergiy Lavrynenko Nov 3, 2003 - 7:51 PM

Dear James,

I sent you e-mail with the sample project. It includes CFormView-derived class which supports toolbars in any state (when docked or floated).

Do not hesitate to ask me any questions.

Regards, Sergiy.

Christophe Guibert Sep 25, 2004 - 1:40 PM

Dear Sergiy,



I experience a very similar problem in a CFormView derived class using CExtToolControlBar.



I am interested by your sample project including a CFormView derived class with support of toolbars in any state (docked or floated).



Could send it to me ? Thank you.



Best Regards



Christophe Guibert