Click here to Skip to main content
Licence 
First Posted 5 Jan 2002
Views 90,002
Downloads 1,906
Bookmarked 35 times

CMultiCombo - A checkbox-bitmapped combobox

By | 27 Jan 2002 | Article
Present a combo-box class that allows multiple checkbox bitmaps to be placed next to each item.

Sample Image - multicombo.jpg

Some time ago I was trying to figure out a solution for a graphics application. The application was based on layers that could be shown or hidden, and at the same time could be locked or unlocked. The solution I found is this combo box, where you can select an item (layer) or just change the properties of the other itens by clicking on the icons. Try it out! Click on the item or on the icons in the demo app and see what happens!

Almost everything in the code is self explanatory. Some of the code was based on the article "Checkbox ComboBox" avaible on this site (thanks for the guys who created it). In the sample project you'll find a class called CMultiCombo that is responsable for creating the combobox and drawing the graphics in the combo.

Notice that I've use two icons inside the combobox that represent two properties. This properties are saved on the ItemData property of the CComboBox. Since the properies are just bit values (ON/OFF) and the item data is a DWORD/16 bytes value this ComboBox could be expanded to use TONS of properties with just some modifications to the code.

To test the code, compile it and press the "Add Something to the Combo-box" button and then try to select some items and click on the icons while the list of the combobox is open!

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

Mauricio Ritter

Web Developer

Brazil Brazil

Member

Mauricio Ritter lives in Brazil, in the city of Porto Alegre. He is working with software development for about 8 years, and most of his work was done at a bank, within a home and office banking system.
Mauricio also holds MCSD, MCSE, MCDBA, MCAD and MCT Microsoft certifications and work as a trainer/consultant in some MS CTEC in his city.
Mauricio also works in his own programming site, aimed to Brazilian Developers: http://www.dotnetmaniacs.com.br
 
In his spare time he studys korean language...

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
GeneralMy vote of 1 Pinmemberxinkmt15:26 3 Aug '10  
General;) Pinmemberinch4079:11 8 Dec '07  
GeneralGetting Text and Button Status PinmemberFred Foscalina5:23 28 Mar '02  
GeneralNot using in a dialog PinmemberAnonymous20:11 24 Feb '02  
Generaldoes not build PinmemberJulia Larson19:02 25 Jan '02  
GeneralRe: does not build PinmemberMauricio Ritter23:26 25 Jan '02  
GeneralRe: does not build PinmemberMauricio Ritter9:19 28 Jan '02  

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
Web03 | 2.5.120517.1 | Last Updated 28 Jan 2002
Article Copyright 2002 by Mauricio Ritter
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid