Click here to Skip to main content
Click here to Skip to main content

A Combobox with bitmaps

, 24 Nov 1999
Rate this:
Please Sign up or sign in to vote.
A combo box that can be used to display bitmaps
<!-- STEP 2. Include download and sample image information -->
  • Download demo project - 22 Kb
  • Download source - 4 Kb
  • Sample Image

    This control was made after the useful Icon Picker Combo Box by Joel Wahlberg


    1. Include CBitmapPickerCombo.cpp and CBitmapPickerCombo.h in your project
    2. In the resource editor create a regular combobox with at least the following styles: DropList, OwnerDraw Variable, Has Strings
    3. Create a control member variable for the combobox in VC's classwizard
    4. Replace CComboBox with CBitmapPickerCombo in your dialog's .h file
    5. In OnInitDialog use the AddBitmap or InsertBitmap member functions to add CBitmaps (and optional strings) to the combobox
    The height of the combobox is automatically set to the highest bitmap.

    Relevant member function prototypes

    <!-- start a block of source code -->
    int CBitmapPickerCombo::AddBitmap(const CBitmap *bitmap, const char *string = NULL);
    int CBitmapPickerCombo::InsertBitmap(int nIndex, const CBitmap *bitmap, const char *string = NULL);


    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here

    About the Author

    Anneke Sicherer-Roetman
    Web Developer
    Netherlands Netherlands
    No Biography provided

    Comments and Discussions

    GeneralStrange behavior on scrolling Pinmemberindra2025-Jun-06 21:04 
    GeneralRe: Strange behavior on scrolling PinmemberMichael Gunlock28-Oct-07 18:24 
    GeneralDrop down window zero height PinmemberObliterator10-Jun-05 4:34 
    GeneralRe: Drop down window zero height PinsussAnonymous18-Aug-05 6:49 
    Questionhow to link data in combo box to dialog box Pinmemberjinshi22-Jan-05 19:58 
    GeneralNIce Pinmembersreejith ss nair11-Dec-04 22:15 
    GeneralIntergration with MFCGrid PinmemberMHillary23-Jul-04 6:14 
    QuestionHow to delete bitmap? PinsussBruce Hsiao28-Sep-03 23:16 
    AnswerRe: How to delete bitmap? PinmemberMyrkron24-Jul-07 8:27 
    Generalgood Pinmemberlovexinqing30-Mar-03 10:42 
    GeneralRe: good PinmemberKongShan13-May-03 14:57 
    GeneralRe: good PinsussAnonymous17-May-03 13:50 
    GeneralRe: good PinmemberBin Xiong13-Jun-05 17:55 
    GeneralUnable to place other bitmaps PinmemberAnonymous7-May-01 22:30 
    GeneralRe: Unable to place other bitmaps PinsussMarron23-Jan-04 10:32 
    GeneralRe: Unable to place other bitmaps Pinmembervadimpl11-May-06 9:16 
    QuestionWhy not use CComboBoxEx? PinsussDavid Saulnier26-May-00 10:11 
    AnswerRe: Why not use CComboBoxEx? PinsussChristian Carrillo16-Jun-00 5:18 
    AnswerRe: Why not use CComboBoxEx? PinmemberPaul Martinsen28-Feb-02 13:02 
    GeneralCombobox on a CDialogBar Pinsussjose manjon1-Mar-00 7:18 
    GeneralRe: Combobox on a CDialogBar PinmemberAnonymous11-Jun-01 22:29 
    GeneralRe: Combobox on a CDialogBar PinmemberRémi Morin25-Jul-01 3:11 
    GeneralRe: Combobox on a CDialogBar ;) PinmemberRemi Morin26-Jul-01 3:08 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    | Advertise | Privacy | Mobile
    Web02 | 2.8.140721.1 | Last Updated 25 Nov 1999
    Article Copyright 1999 by Anneke Sicherer-Roetman
    Everything else Copyright © CodeProject, 1999-2014
    Terms of Service
    Layout: fixed | fluid