Print Page | Close Window

How to Use CComboBox in Ribbon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=15657
Printed Date: 18 July 2025 at 7:45pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to Use CComboBox in Ribbon
Posted By: archies
Subject: How to Use CComboBox in Ribbon
Date Posted: 18 November 2009 at 3:48am
Hi;

My existing application has an Owner draw ComboBoxEx , which is derived from CComboBox.

Now i switched my Application to Ribbon , Please tell me how can i used that older ComboBoxEx class with minimum alteration.So that my Ribbon supports that combo , and handles the Selchnage event.

*My combobox is created at runtime , and may be have more than one instance.

Thnx



Replies:
Posted By: Oleg
Date Posted: 18 November 2009 at 7:12am
Hi,
 
See Samples\CommandBars\CommonControls  sample  - it shows how to add any Window control to Toolbar.
 
but think better replace it to xtpControlComboBox/CXTPControlComboBox to match style. (see RibbonSample)


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: archies
Date Posted: 19 November 2009 at 5:14am
Hi Oleg ;
Thnx for ur quick response.
i did this :
CComboBoxEx *pControlClass;
          pControlClass = new CComboBoxEx();
          pControlClass->Create(rect,this);
          CXTPControlCustom* pCustomControl = (CXTPControlCustom*)CXTPControlCustom::CreateObject();
          pCustomControl->SetControl(pControlClass);
          pGroup->Add(pCustomControl, nID);


it is working fine ..
thnx





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net