0

Hi guys :)
I have my console app finished (c++).
And now I'm looking for a way to give it an icon. So when I distribute it, it keeps the icon.
I didn't find anything yet. I would really appreciate some help!

Nobody want to continue helping me? :(

Beasly
  • 1,517
  • 4
  • 20
  • 30

1 Answers1

1

You will need a resource file (.rc) and specify an icon to get it included in the binary. The first icon (the one with the lowest ID number) will be the icon of your application.

Unfortunately the new express editions do not come with an integrated resource editor anymore, but you can use the excellent free alternative ResEd for this task.

You simply have to create a new .rc file, add the icon and then include the .rc file in your c++ project.

Flavio
  • 458
  • 1
  • 3
  • 10
  • I have the full VS2005. I have a *.rc file now. And now? – Beasly Feb 03 '11 at 14:46
  • I also get this error on compiling: `1>------ Build started: Project: GenericCommandConverter, Configuration: Debug Win32 ------ 1>Compiling resources... 1>.\GenericCommandConverter3.rc(31) : error RC2176 : old DIB in DocumentApplications.ico; pass it through SDKPAINT 1>Build log was saved at "file://c:\Documents and Settings\...\Debug\BuildLog.htm" 1>GenericCommandConverter - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========` – Beasly Feb 03 '11 at 14:47
  • Where do I have to include it? Autocompletion doen't offer it? – Beasly Feb 03 '11 at 15:00
  • If you have the full version you should be able to add the icon directly to the project and let visual studio create the rc file for you. There's some info about the specific error in this question: http://stackoverflow.com/q/3384112/564265 – Flavio Feb 04 '11 at 13:17