Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » embedding an icon in the .exe (not the TopWindow)
embedding an icon in the .exe (not the TopWindow) [message #9597] Fri, 18 May 2007 23:41 Go to next message
obijohn is currently offline  obijohn
Messages: 11
Registered: May 2007
Promising Member
I'm using 705-dev2. I've got a single icon in the .iml file, which I've successfully added to the TopWindow app (so the icon shows in the window and in the tray). However, the .exe file iteself doesn't have an icon. Can I use the icon that's in the .iml file as the icon for the .exe, or does this have to be done with a .rc file and a resource compiler? (this is a win32-only issue, I guess)

I tried adding a .rc file using an example I found somewhere, but when I compile in theIDE, there is an error that windres throws which is from spaces in my directory names. Surely there is a simpler way?

Thanks for any help...
Re: embedding an icon in the .exe (not the TopWindow) [message #9598 is a reply to message #9597] Sat, 19 May 2007 11:14 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
First of all, better do not put spaces into directory names Smile

To make it work, you need to mark the icon as "export":

Right-click it, choose "Image.." and click "Export as ...".

Then the icon will be saved as icon.ico, therefore you can place it into .rc file.
Re: embedding an icon in the .exe (not the TopWindow) [message #9601 is a reply to message #9598] Sat, 19 May 2007 12:44 Go to previous messageGo to next message
obijohn is currently offline  obijohn
Messages: 11
Registered: May 2007
Promising Member
ok, I changed the project path so that it doesn't contain spaces, and I re-installed upp in a root directory without spaces. Now windres doesn't complain. Very Happy

In the .iml, I did as you said and selected "Export" and an icon.ico is created automatically.

Then, I created a .rc file with this one line:
Quote:

app ICON icon.ico


And now theIDE builds everything automatically and the icon is in the .exe. YAY!

BTW, I really like Ultimate++ and theIDE. I plan on using them both for a very long time!
icon9.gif  Re: embedding an icon in the .exe (not the TopWindow) [message #10337 is a reply to message #9597] Tue, 03 July 2007 07:11 Go to previous message
bonami is currently offline  bonami
Messages: 186
Registered: June 2007
Location: Beijing
Experienced Member
you need an icon.ico
and add a line icon.rc to file section of you .cpp
then write .rc
APP ICON "icon.ico"

this works for me. studied from EyeCare example and post

[Updated on: Tue, 03 July 2007 08:02]

Report message to a moderator

Previous Topic: [feature] Blitz gratiously handling problems
Next Topic: Debug mode. What is the bug?
Goto Forum:
  


Current Time: Fri Mar 29 07:37:27 CET 2024

Total time taken to generate the page: 0.01077 seconds