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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Can you post some code to use a CImageList array element in a CComboBoxEx?
Thanks,
Dan
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.
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.
ASKER
Perfect. Thanks!
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