|
|
|
|
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.
Subject |
Author |
Date |
|
Sachin Gupta
|
Jun 30, 2006 - 5:20 PM
|
Hi,
I am new to Prof-UIS and am trying to migrate one of our old MFC applications to start using Prof-UIS. We had written our own class [CMyToolbar] derived from CToolbar and have lot of custome code in the derived class CMyToolbar.
Now, with ProfUIS, I am deriving my class CMyToolbar directly from CExtToolControlBar. When I do this, I get lot of compilation errors and the following methods are missing in the CExtToolControlBar class -
GetItemRect GetItemID GetToolBarCtrl OnSetButtonSize OnSetBitmapSize GetButtonInfo GetButtonText SetButtonInfo
Can someone please suggest what to do ?
Thanks, Sachin
|
|
Technical Support
|
Jul 3, 2006 - 10:28 AM
|
You should migrate to the new toolbar by adding your custom toolbar based features step by step. The CToolBar class in MFC is a container window for the CToolBarCtrl control. The CToolBar class simply makes the toolbar common control redockable and resizable. In simple words, the CToolBar class is an extension of the CControlBar class with the toolbar common control inside. The CExtToolControlBar class is a window which is not based on CToolBar nor on CToolBarCtrl. CExtToolControlBar is written from scratch and manages its own array of CExtBarButton objects, which implement toolbar buttons. This design is essential to implement advanced features you can see in Microsoft applications. You can use CExtToolControlBar::GetButtonsCount() , CExtToolControlBar::CommandToIndex() and CExtToolControlBar::GetButton() methods to access CExtBarButton objects by index or by command identifier. All other button properties can be changed by using the following methods of the CExtBarButton class: Rect() , GetCmdID() , GetText() , GetStyle() .
|
|