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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attach icon to simple Win32 Console app 1

Status
Not open for further replies.

chpicker

Programmer
Apr 10, 2001
1,316
Is there a way to attach an icon to a simple Win32 Console app?

I created a new project based on Win32 Console and told it to create an Empty Project. I created a single source file, "hello.cpp":
[tt]
#include <iostream.h>

int main(void)
{
cout << &quot;Hello!\n&quot;;
return 0;
}
[/tt]
How would I attach an icon to the executable when I compile this?

Thanks,

Ian
 
1. Create a simple text file in your current workspace.

2. Type in the string ConApp ICON I_ICON.ICO
Change I_ICON.ICO to your current icons file name
(this icon must be in the same directory of the projects workspace).

3. Save this file as icon.rc

4. Build, and your console app will no longer have the generic
default console icon that windows provides. Mike L.G.
mlg400@blazemail.com
 
Beautiful...thanks Mike! That's exactly what I needed!

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top