This control was made after the useful Icon Picker Combo Box by Joel Wahlberg.
Usage
- Include CBitmapPickerCombo.cpp and CBitmapPickerCombo.h in your project
- In the resource editor, create a regular
combobox
with at least the following styles: DropList
, OwnerDraw
Variable
, Has Strings - Create a control member variable for the
combobox
in VC's classwizard - Replace
CComboBox
with CBitmapPickerCombo
in your dialog's .h file - In
OnInitDialog
, use the AddBitmap
or InsertBitmap
member functions to add CBitmap
s (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.