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 / Fullscreen/Window Icon

Author
Message
Mr Awesome Guy
15
Years of Service
User Offline
Joined: 19th May 2009
Location:
Posted: 26th May 2009 22:50
How do I make my game full screen instead of having it be in a window?

Also, how do I set the window icon for my game (the icon in the top left-hand corner of the window). I know dbSetWindowTitle sets the title, dbSetWindowSize sets the size, so I tried dbSetWindowIcon but it didn't work... I've also looked around on how to do this but didn't find anything. Any help?
ABXG
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Canada
Posted: 26th May 2009 23:41
You can use dbSetWindowOff.

------------------------------------
Currently 1500+ lines of code into an "over-the-shoulder" action RPG with combat based on rag-doll physics.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 26th May 2009 23:43
Quote: "I tried dbSetWindowIcon but it didn't work"


Are you sure you had the proper relative path to your icon graphic?

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
WH8
15
Years of Service
User Offline
Joined: 17th Mar 2009
Location:
Posted: 27th May 2009 02:23 Edited at: 27th May 2009 02:32
dbSetWindowIcon(), I believe, doesn't exist.

You need to use a resource editor (.rc file editor) for this. Use the resource editor to make a .rc file. Do NOT make the .rc file manually; use the resource editor. I recommend that you use ResEdit. Use the resource editor to add an icon resource. When you compile your program, the icon should appear at the top-left of the window as well as on the taskbar button. If you experience any problems, please make a post.

Remember to include the created .rc file into your project. If you do not include the .rc file, it is the same as not having it there in the first place.
Conor B
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Dublin, Ireland
Posted: 13th Jun 2009 04:35
You can create a resource file in C++ Express.. you just have to edit it in notepad. But I can only get and Icon working for the exe using

But how would I go about getting a working icon for the top left of the window in the same way? Thanks.

There are 10 types of people, people who know binary and people who don't!
ABXG
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Canada
Posted: 13th Jun 2009 09:33
In my program the Icon was automatically placed in the top left corner after loading it like this in my resource file:



I also actually added the icon file to my project, check out the attached screenshot if this is unclear.

------------------------------------
Currently 3200+ lines of code into an "over-the-shoulder" action RPG..

Attachments

Login to view attachments
MaRo
18
Years of Service
User Offline
Joined: 1st Jan 2006
Location: Central Europe
Posted: 13th Jun 2009 13:37 Edited at: 13th Jun 2009 13:37
I had some troubles with default icon also . My solution is as follows and should work for anybody.

First make and icon and put it in resources.rc file like that:


Also make sure you have a define in your resource.h file:

(Value is totally up to you as long as it doesn't collide with some other icons )

Next in you main .cpp file in DarkGDK function before main loop, set it by using SendMessage like this:


I hope it'll help
WH8
15
Years of Service
User Offline
Joined: 17th Mar 2009
Location:
Posted: 19th Jun 2009 03:39
If you define IDI_ICON as 101, I believe it will automatically appear at the top-left of the window?
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 19th Jun 2009 11:14
you are correct, the default value for the icon is 101, and no calls are needed to display it if its given that value in the resource.h file... along with the name IDI_ICON1...

in resource.h :
#define IDI_ICON1 101

The .rc file is a little more complex if you are going to manually create it.

in <appname>.rc :
IDI_ICON1 ICON "C:\\<path to icon here>\\icon.ico

is the line that needs to be changed/added.

If you arent sure what you are doing though, I would suggest getting your hands on an application to generate the files for you as putting things in the right place is pretty important

If it ain't broke.... DONT FIX IT !!!

Login to post a reply

Server time is: 2024-11-25 08:25:23
Your offset time is: 2024-11-25 08:25:23