4

I want to change the default .exe icon to some other icon in C/C++. Does anybody know how to do that?

kiddo
  • 1,596
  • 7
  • 31
  • 60

4 Answers4

4

Already answered.

Change app icon in Visual Studio 2005?

You have to place your .ico file in the resources folder first of course.

Community
  • 1
  • 1
Peter Alexander
  • 53,344
  • 14
  • 119
  • 168
  • Sorry, but that does not answer the question. He wants to know how to set the _**default**_ `.exe` icon. –  Apr 05 '20 at 22:44
2

Use this one: http://www.angusj.com/resourcehacker/

Since you specified that you are using VS2008 I can point you here: How do I set the icon for my application in visual studio 2008? (duplicate question)

Community
  • 1
  • 1
Jack
  • 131,802
  • 30
  • 241
  • 343
  • Not really a programming solution or a C/C++ solution, but simple and to the point –  Feb 24 '10 at 11:56
  • Jack i apperciate that u have replied...like steve said..its not a programming solution for it.. – kiddo Feb 24 '10 at 12:06
  • Sorry, but that does not answer the question. He wants to know how to set the _**default**_ `.exe` icon. –  Apr 05 '20 at 22:44
1

if you are using any ide like dev c++, then you can specify the icon you want to appear on your file in project options

Anuswadh
  • 542
  • 1
  • 11
  • 19
  • Sorry, but that does not answer the question. He wants to know how to set the _**default**_ `.exe` icon. –  Apr 05 '20 at 22:43
1

On Windows, if the executable contains many icons, the 1st of them will be the default.
If you have icons resource in your programming environment, place the icon you want first in the list.

Edit: since you created an empty project, to add an icon, follow these instructions:

(as I said in my comment, I don't have VS2008, but the steps should be the same)

Menu: Insert -> Resource -> Import
Select "Icon", press the import button and select your icon file.

Now, close the icon editor, and save the resource script in the project folder.
Select "Files View" and add the resource script file in the "Resource Files".
That's it.

Nick Dandoulakis
  • 42,588
  • 16
  • 104
  • 136
  • am using vs2008..I do have a folder called"Resources" but there's nothing in it... – kiddo Feb 24 '10 at 12:09
  • @Rakesh, in VS you can insert resources in your project. I don't have VS2008, but it's very easy to add an icon. Did you create an empty project? – Nick Dandoulakis Feb 24 '10 at 12:15
  • Yes,I have created an empty project win 32 console app... If u jus give me an idea of how to do that...it wud be helpful for me – kiddo Feb 24 '10 at 12:28
  • Sorry, but that does not answer the question. He wants to know how to set the _**default**_ `.exe` icon. –  Apr 05 '20 at 22:43