Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / How do I set the icon of my app? (.ICO)

Author
Message
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 10th Sep 2011 20:13 Edited at: 10th Sep 2011 20:32
Well, that's the question...
I am using VC++ 2008 Express. I have googled it with no help.

EDIT: I decided to look at the search in the forum.
I found the solution:
From jinzai
Quote: "resource.h
+ Code Snippet#define IDI_ICON 100



appname.rc
+ Code Snippet#include "resource.h"

IDI_ICON ICON "filename.ico"



"


The fastest code is the code never written.
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 10th Sep 2011 21:41
You could also pack the icon into a resource file (.rc) using a resource editor like the free ResEdit. It's then compiled directly into the .exe file.

vitinho444
14
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 14th Sep 2011 20:35
hey hawkblood

i didnt understood your code snippet..

So i make a resource.h file in the resources and put there
#define IDI_ICON 100
then i make a .rc file with the app name and then put there the include of the resource.h and then the defining of the icon?

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 14th Sep 2011 20:49
Sorry. I should have used the link instead. I'll try to find it again.

http://forum.thegamecreators.com/?m=forum_view&t=122877&b=22
It's in the 7th post (by jinzai).

The fastest code is the code never written.
vitinho444
14
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 15th Sep 2011 18:55
oh thanks a lot

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5

Login to post a reply

Server time is: 2024-11-19 07:39:58
Your offset time is: 2024-11-19 07:39:58