I have a Combo Box, CBS_DROPDOWNLIST.
Can i add icons to the strings.
I think i can but i don't know how...
Printable View
I have a Combo Box, CBS_DROPDOWNLIST.
Can i add icons to the strings.
I think i can but i don't know how...
Annnnnnnnnnnnnnnnnd your choices are (cue quiz show music):-
1. Create an owner-drawn combo box and paint the icons and text in yourself! One for the masochists among you.
2. Create a ComboBoxEx and use its item image list functionality to draw the icons for you! Remember that ComboBoxEx controls are part of the common controls library that needs to be initialized before use.
So ElastoManiac (squeezes question cards together), which one are you gonna take tonight? ;)
i'm gonna take #2
Hey, can you post an example of CBEM_SETIMAGELIST?
I dont know how to declare HIMAGELIST, and how to use it...
MSDN Doesn't say anything about it...
You create and manipulate image lists with the Image List API. The specific functions you will be interested in are ImageList_Create and ImageList_LoadImage. Have a look at Ken Fitlike's ComboBoxEx sample code at FoosYerDoos.
thanks!