I have never worked with rc-files.
I just want to link (pack) my ico-files into the binary and use them then. How can I include a ico-file in the rc-file and reference it in my application?
Create a resource file, e.g., resource.rc and add it to your project.
If you want to add an Icon for your application, then add a line to the resource file similar to the following.
aMAIN ICON "<Path_To_Your_Icon>/<Icon_File_Name>.ico"
Now compile your project and your application will have the icon You've specified.
Regards,
Biplab
Quote from: Biplab on March 27, 2007, 08:19:06 AM
Now compile your project and your application will have the icon You've specified.
Ok, but how can I adress it in my code?
For example:
How can I create a wxIcon object?
Quote from: MoonKid on March 27, 2007, 06:15:18 PM
Ok, but how can I adress it in my code?
For example:
How can I create a wxIcon object?
Create a sample wxWidgets Project using Wizard of C::B and look into
app.cpp file and
resource.rc file. You'll understand how it can be implemented. :)
Regards,
Biplab
Hm... So easy! ;)
I am not sure If I understand the wx-doc right. Is it only under windows and os2 possible to use resources?
How can I pack ico-files to my binary in unix/linux or mac os x applications?
I've not tried in other platforms.
Download the following ebook.
h**p://www.phptr.com/content/images/0131473816/downloads/0131473816_book.pdf
Read the APPLICATION INSTALLATION sub-chapter in chapter 20. There are couple of hints on how to use icons in Linux. Hope it'll help you. :)
Quote from: Biplab on March 27, 2007, 07:09:21 PM
Read the APPLICATION INSTALLATION sub-chapter in chapter 20. There are couple of hints on how to use icons in Linux. Hope it'll help you. :)
Ok, the crux of it for me: Do not use a plattform specific icon-handling like rc-files. I should add icons as extern ico-files to my application. ;)