IconComboBox

Feb 24, 2009 at 1:54pm
Hi,

I found some source code to use an IconComboBox with the follow function.
I made an Icon in Visual 2008 but I don't now how I must use the function.
I don't understand how I must give the filename to the function?


virtual int AddIcon(LPCTSTR lpszIconFileName);


http://www.codeguru.com/cpp/controls/combobox/article.php/c1805/

Thanks
Feb 24, 2009 at 2:19pm
Your_CIconComboBox_Object.AddIcon("(path)\\filename.ico");
Feb 25, 2009 at 3:50pm
Don't use this newbie code.
Use the official method with the ComboBoxEx control or with Owner-Draw ComboBox
Many samples on MSDN
Feb 25, 2009 at 4:51pm
"Official methods" are in C

Couldn't CIconComboBox be something similar to MFC's CComboBoxEx?
Feb 27, 2009 at 11:47am
Thanks ,

I found some verry good source code :

http://www.codeproject.com/KB/combobox/colourpickercb.aspx

With this you can use the regular combobox with the right settings of MFC.
-> Just change the normal combobox class to CColorPickerCB class.
-> Don't forget to initialize with classname.InitializeDefaultColors();
-> DONE

Feb 27, 2009 at 5:21pm
> I found some verry good source code :

No, not "good" code at all (not professional, full of bugs (see remarks))
The best samples codes, from which all samples are copied, are in MSDN (PSDK, MS KB, MSDN api doc, etc)
Last edited on Feb 27, 2009 at 5:23pm
Feb 27, 2009 at 6:04pm
closed account (z05DSL3A)
george, why do you even bother posting, all you ever seem to do is tell people to go to MSDN or ask on usenet?
Feb 28, 2009 at 1:05pm
Because the only available codes are of course on MSDN !
It's the Bible !
Topic archived. No new replies allowed.