Click here to Skip to main content
Licence 
First Posted 24 Nov 1999
Views 149,196
Bookmarked 55 times

A Combobox with bitmaps

By | 24 Nov 1999 | Article
A combo box that can be used to display bitmaps
  • 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

    Usage

    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

    int CBitmapPickerCombo::AddBitmap(const CBitmap *bitmap, const char *string = NULL);
    int CBitmapPickerCombo::InsertBitmap(int nIndex, const CBitmap *bitmap, const char *string = NULL);
    

    License

    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

    Member



    Sign Up to vote   Poor Excellent
    Add a reason or comment to your vote: x
    Votes of 3 or less require a comment

    Comments and Discussions

     
    You must Sign In to use this message board. (secure sign-in)
     
    Search this forum  
     FAQ
        Noise  Layout  Per page   
      Refresh
    GeneralStrange behavior on scrolling Pinmemberindra2021:04 25 Jun '06  
    GeneralRe: Strange behavior on scrolling PinmemberMichael Gunlock18:24 28 Oct '07  
    GeneralDrop down window zero height PinmemberObliterator4:34 10 Jun '05  
    GeneralRe: Drop down window zero height PinsussAnonymous6:49 18 Aug '05  
    Questionhow to link data in combo box to dialog box Pinmemberjinshi19:58 22 Jan '05  
    GeneralNIce Pinmembersreejith ss nair22:15 11 Dec '04  
    GeneralIntergration with MFCGrid PinmemberMHillary6:14 23 Jul '04  
    QuestionHow to delete bitmap? PinsussBruce Hsiao23:16 28 Sep '03  
    AnswerRe: How to delete bitmap? PinmemberMyrkron8:27 24 Jul '07  
    Generalgood Pinmemberlovexinqing10:42 30 Mar '03  
    GeneralRe: good PinmemberKongShan14:57 13 May '03  
    GeneralRe: good PinsussAnonymous13:50 17 May '03  
    GeneralRe: good PinmemberBin Xiong17:55 13 Jun '05  
    GeneralUnable to place other bitmaps PinmemberAnonymous22:30 7 May '01  
    GeneralRe: Unable to place other bitmaps PinsussMarron10:32 23 Jan '04  
    GeneralRe: Unable to place other bitmaps Pinmembervadimpl9:16 11 May '06  
    QuestionWhy not use CComboBoxEx? PinsussDavid Saulnier10:11 26 May '00  
    AnswerRe: Why not use CComboBoxEx? PinsussChristian Carrillo5:18 16 Jun '00  
    AnswerRe: Why not use CComboBoxEx? PinmemberPaul Martinsen13:02 28 Feb '02  
    GeneralCombobox on a CDialogBar Pinsussjose manjon7:18 1 Mar '00  
    GeneralRe: Combobox on a CDialogBar PinmemberAnonymous22:29 11 Jun '01  
    GeneralRe: Combobox on a CDialogBar PinmemberRémi Morin3:11 25 Jul '01  
    GeneralRe: Combobox on a CDialogBar ;) PinmemberRemi Morin3:08 26 Jul '01  

    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.

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