Page 1 of 1

A couple of Visual C++ questions.

Posted: Thu Nov 27, 2008 2:27 am
by Mad-Mazda
Q1: Ok ive made a basic program in Visual C++ 2005, but now i want to give the exe an icon, can someone please explain the steps needed to do so.

Q2: In a combo box how can i set the default value.

Posted: Thu Nov 27, 2008 5:01 am
by B@z
Q1: i dont know how it is in 2005, but in 2003 i just simply added to resources and it worked.. (icon.ico)

Q2: dunno but maybe setValue? xD or settext or something after creating it

Posted: Thu Nov 27, 2008 5:32 am
by Mad-Mazda
Q1: Ok ill give it a go.
Q2: Never mind about that previous question, Im tryin to Make it so the combo box isnt editible.. Eg: so you can only select objects you can type in it. How caould i acheive this.

Posted: Thu Nov 27, 2008 9:31 am
by JP
combo boxes are never editable are they? :s

i'm not sure about 2005 either but when you set up a project in 2008 it gives you an icon right off the bat which i guess you can just overwrite with your own one. By the looks of it it just has the icon file and a resource.h which i'm not sure what it contains, if anything!

devc++ was always super easy to add an icon to as it was one of the project options.... shame it's a shoddy IDE :'(

Posted: Thu Nov 27, 2008 10:22 pm
by Mad-Mazda
Yea i found out last night there is an option to make the combo boxs editable or not.

As for the icon, thats what ive done i just replaced the origional with my one... but its still uses the origional for some reason. Thats why i wanted to know how to give a project and icon from scratch.

Posted: Fri Nov 28, 2008 8:16 am
by JP
Maybe you have to rebuild the project? From scratch so clean it then build it? (not sure what the difference between that and rebuild is...)

I tried to drop the icon into my 08 project and didn't pick it up...