Print Page | Close Window

How to do a color pick combobox on Toolbar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=11149
Printed Date: 13 June 2025 at 4:57pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to do a color pick combobox on Toolbar
Posted By: yanlv
Subject: How to do a color pick combobox on Toolbar
Date Posted: 23 June 2008 at 5:20am
I want to build a color pick combobox on Toolbar, which looks like:

http://www.codeproject.com/KB/combobox/colourpickercb.aspx

I applied Xtreme Toolkit Pro for toolbar and used the class CXTPControlComboBox. It's not inherit from the class Combo, so I couldn't apply the class of the codeproject. But I don't know how to do the same thing in Xtreme Toolkit Pro.
Any suggestion? Thanks a lot.

 



Replies:
Posted By: Oleg
Date Posted: 23 June 2008 at 6:15am

Hi,

 
Here small sample:
 
https://forum.codejock.com/uploads/20080623_061451_ColorCombo.zip - ColorCombo.zip


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


Posted By: yanlv
Date Posted: 23 June 2008 at 9:44pm
It works, thanks a lot.


Posted By: yanlv
Date Posted: 24 June 2008 at 7:24am
sorry, I made a mistake.
Something is wrong.
When I compile in VC6.0:
Compiling...
ColorComboBox.cpp
E:\yanwei\knowledge\C++\colorcombox\ColorCombo_From_CodeJock\ColorComboBox.cpp(30) : error C2660: 'CXTPControlComboBox::CXTPControlComboBox' : function does not take 1 parameters
Error executing cl.exe.


Then I change

 CColorComboBox::CColorComboBox(CXTPCommandBars* pCommandBars)
 : CXTPControlComboBox(pCommandBars)


To

 CColorComboBox::CColorComboBox(CXTPCommandBars* pCommandBars)
 : CXTPControlComboBox()

Compile is successful. It turns out The Edit box of Combobox is right, but the Dropdownlist of Combobox is empty(i.e., no color rectangle or text.)

Please see the picture using PrintScreen:

http://pddl02.mofile.com/p/1/free/2008/6/24/6/602D3VWTQ7_202_500_320.jpg

I think drawitem() function draw the dropdownlist, but after debugging, I found it never went into drawitem(). I check the sample of Xtreme Toolkit Pro, and found that drawitem() is also useless in the Xtreme ToolkitPro v11.1.0\Samples\CommandBars\CustomThemes.

By the way, I used Xtreme ToolkitPro v11.1.0.

Any Suggestion?
Thanks a lot.


Posted By: Oleg
Date Posted: 24 June 2008 at 9:26am

Hi,

Custom Draw added in 11.2 :-(  Download last version.


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



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