IconComboBox

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
Your_CIconComboBox_Object.AddIcon("(path)\\filename.ico");
Don't use this newbie code.
Use the official method with the ComboBoxEx control or with Owner-Draw ComboBox
Many samples on MSDN
"Official methods" are in C

Couldn't CIconComboBox be something similar to MFC's CComboBoxEx?
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

> 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
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?
Because the only available codes are of course on MSDN !
It's the Bible !
Topic archived. No new replies allowed.