Changing my C++ program's icon

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2006
Posts: 37
Reputation: Firestone is an unknown quantity at this point 
Solved Threads: 0
Firestone Firestone is offline Offline
Light Poster

Changing my C++ program's icon

 
0
  #1
Jun 25th, 2008
How can I change my program's icon for anyone who uses the program? Obviously I would have to include the .ico file with it, but beyond that, I'm stumped.
=================================
There are 10 types of people in the world,
Those who understand binary, and those who don't
=================================
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,951
Reputation: Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of 
Solved Threads: 214
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: Changing my C++ program's icon

 
0
  #2
Jun 26th, 2008
Typically the main icon is linked in at compilation. How exactly you do it depends on your compiler. In all cases, a Windows resource named MAINICON is in your exe.

You can also check out Resource Hacker, which you can use to manually change a program's icon.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 37
Reputation: Firestone is an unknown quantity at this point 
Solved Threads: 0
Firestone Firestone is offline Offline
Light Poster

Re: Changing my C++ program's icon

 
0
  #3
Jun 26th, 2008
How would I add it in with Code::Blocks? I can't figure it out
=================================
There are 10 types of people in the world,
Those who understand binary, and those who don't
=================================
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,951
Reputation: Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of 
Solved Threads: 214
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: Changing my C++ program's icon

 
0
  #4
Jun 27th, 2008
I don't know.

If you know how to link windows resources to your project, create an icon resource named MAINICON.

Otherwise you'll have to use resource hacker.

Good luck!
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 1,415
Reputation: William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of 
Solved Threads: 114
Sponsor
William Hemsworth William Hemsworth is offline Offline
Nearly a Posting Virtuoso

Re: Changing my C++ program's icon

 
0
  #5
Jun 27th, 2008
Its possible to do, ive never tried this but I think it should work.
  1. SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(NULL,
  2. MAKEINTRESOURCE(ICON_ID)));
I need pageviews! most fun profile ever :)
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 118
Reputation: marco93 is infamous around these parts marco93 is infamous around these parts marco93 is infamous around these parts 
Solved Threads: 12
marco93 marco93 is offline Offline
Junior Poster

Re: Changing my C++ program's icon

 
0
  #6
Jun 28th, 2008
Originally Posted by williamhemswort View Post
ive never tried
If you've never tried, then try.
It takes 2 seconds...
Last edited by marco93; Jun 28th, 2008 at 10:15 am.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 1,415
Reputation: William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of 
Solved Threads: 114
Sponsor
William Hemsworth William Hemsworth is offline Offline
Nearly a Posting Virtuoso

Re: Changing my C++ program's icon

 
0
  #7
Jun 28th, 2008
No it doesn't, you have to create a Win32 project, make a window and then make it change the icon at runtime.. The point is I dont need to try it because im not the one with the problem, hes the one who should be putting in the effort to test it, im just giving suggestions.
I need pageviews! most fun profile ever :)
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 160
Reputation: dmanw100 is on a distinguished road 
Solved Threads: 12
dmanw100's Avatar
dmanw100 dmanw100 is offline Offline
Junior Poster

Re: Changing my C++ program's icon

 
0
  #8
Jun 28th, 2008
Is there a simple way to do this in Dev-Cpp? There doesn't seem to be an area to compile linked .ico's into the project. I have tried using IconFX but it cannot add icons to a project that has already been compiled.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 17
Reputation: msk88 is an unknown quantity at this point 
Solved Threads: 2
msk88 msk88 is offline Offline
Newbie Poster

Re: Changing my C++ program's icon

 
0
  #9
Jun 28th, 2008
To dmanw100...

You can do it in Dev C++.Create a project & then go to Project->Project Options & in the "General" page you will find Icon Option for your project(for the .exe).

Done..!!
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 62
Reputation: Maulth is an unknown quantity at this point 
Solved Threads: 5
Maulth Maulth is offline Offline
Junior Poster in Training

Re: Changing my C++ program's icon

 
0
  #10
Jun 29th, 2008
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC