Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom icon for console applications in C++ Builder

Programming

Custom icon for console applications in C++ Builder

by  paskuda  Posted    (Edited  )
I've seen some questions about setting custom icon for console apps in BCB. This may seem a bit tricky, since by default "custom icon" selection field in project options is grayed out. I know at least two ways to set custom icon in such projects :

1. Compile the code with default icon, then use [link http://www.users.on.net/johnson/resourcehacker/]Resource Hacker[/link] and replace default icon with one of your choice.

2. Do it programmer's way:
- create myres.rc file containing following line :
1 ICON "myiconfile.ico"
- compile myres.rc to myres.res by opening it in builder and using Project -> Compile unit.
- remove from your project default .res file (Project1.res maybe?) file and add myres.res (Project -> Add/Remove to/from project)
- build your application
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top