Link to home
Start Free TrialLog in
Avatar of SuperMario
SuperMario

asked on

CImageList in a CComboBox

I have a CImageList of colored boxes for a user to choose from (to designate which color they want to use for a certain action).

I want the CComboBox to display these colors when the list drops down.

How do I manage to paint those icons in each little slot of the combo box?

Thank you,

-Dan

=====

Color: | o | <- that's a combo box
       | o |
       | o |

etc
Avatar of cyberfrank
cyberfrank

Hi!

I.e. here is the color picker combo box:
http://www.codeguru.com/combobox/combo_color_picker.shtml
You can find more from:
http://www.codeguru.com/combobox/index.shtml site.

It's simplier than using image list to showing colors.
CF
ASKER CERTIFIED SOLUTION
Avatar of carldean
carldean
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SuperMario

ASKER

Can you post some code to use a CImageList array element in a CComboBoxEx?

Thanks,
Dan
It's very simple really. Much the same as using images in list and tree controls.

See the article...

Visual C++ Programmer's Guide\Adding User Interface Features\Details\Control Topics\Using CComboBoxEx

I'd only cut and paste the code from there if I was to provide an example for you.
Perfect. Thanks!