adding icons to ComboBox

This is a discussion on adding icons to ComboBox within the Windows Programming forums, part of the Platform Specific Boards category; I have a Combo Box, CBS_DROPDOWNLIST. Can i add icons to the strings. I think i can but i don't ...

  1. #1
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377

    Talking adding icons to ComboBox

    I have a Combo Box, CBS_DROPDOWNLIST.
    Can i add icons to the strings.
    I think i can but i don't know how...
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,255
    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?

  3. #3
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    i'm gonna take #2
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  4. #4
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    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...
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  5. #5
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    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.
    Last edited by anonytmouse; 11-27-2005 at 01:48 AM.

  6. #6
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    thanks!
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with adding strings into ComboBox using Window Handle
    By jasperleeabc in forum Windows Programming
    Replies: 7
    Last Post: 05-05-2009, 04:48 PM
  2. Adding Icons to program
    By dave2142 in forum C Programming
    Replies: 6
    Last Post: 02-19-2008, 07:54 AM
  3. Trouble Adding to ComboBox (*not* an LB_ issue..)
    By roblarky in forum Windows Programming
    Replies: 1
    Last Post: 07-18-2007, 11:27 AM
  4. SVN Import Causes Crash
    By Tonto in forum Tech Board
    Replies: 6
    Last Post: 11-01-2006, 02:44 PM
  5. Adding Icons to your programs
    By Dual-Catfish in forum C++ Programming
    Replies: 6
    Last Post: 01-17-2002, 03:50 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21