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 / Restricting Windowed mode?

Author
Message
Genesis Rage
19
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 9th May 2005 07:11
ive been looking at DGSDK for a while now because ive loved using DB and DBP. downloaded the samples and checked them out, but have some questions about when its in windowed mode.

1) is there a way to remove controls (minimize/maximize buttons)
2) restrict resizing the window

im taking a shot in the dark, but does the DGSDK have commands to do this, or is this something that will have to be done with some other C++ commands?


P4 3.5 GHz HT, 1 GHz FSB, 1 GB PC4000, ATI Radeon 9800XT
Genesis Rage
19
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 10th May 2005 22:46
another thing, if there is a way to allow rezising the window but have it keep a 1 for 1 pixel ratio... meaning not have it stretch or shrink the rendered image to fit the resized window?


P4 3.5 GHz HT, 1 GHz FSB, 1 GB PC4000, ATI Radeon 9800XT
OSX Using Happy Dude
19
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th May 2005 23:29
I think you would need to subclass the window and handle the window resizing there. In addition you can also change the window layout.

Visit http://homepages.nildram.co.uk/~nickk
Calm down dear! Its only The Unofficial DB Sci-Fi Con...
http://spaces.msn.com/members/BouncyBrick/
IanM
Retired Moderator
20
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th May 2005 02:18 Edited at: 11th May 2005 02:20
dbSetWindowLayout(0, 0, 0);

This gives you:
- no icons in the top/right
- no title bar
- default windows icon

Removing the icons from the top/right makes the window non-resizable.

In non-fullscreen windowed mode, the window is always 1-to-1 with the desktop [edit] unless you resize it. If you want to maintain this as the window is resized, you can reset the resolution to the window size each frame (subclassing, or just grabbing the window size yourself) [/edit]

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Genesis Rage
19
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 11th May 2005 15:20
with that command can you still have the min/max/close icons but just not resize? just like throwing out questions before i drop the $180 on DarkSDK

off-topic question as well, can you rename functions in the header files and still have everything work? like renaming dbMaximiseWindow to dbMaximizeWindow (dont know if that is actually a command, but i know some commands are spelled different than first goes through my head)


P4 3.5 GHz HT, 1 GHz FSB, 1 GB PC4000, ATI Radeon 9800XT
IanM
Retired Moderator
20
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th May 2005 21:15
Resizing - you'll probably need to subclass the window like BB originally said

Renaming - no ... and yes.
You can't change the header file, but you can create an inline function or a define to effectively do the same thing:



*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Genesis Rage
19
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 14th May 2005 09:19 Edited at: 14th May 2005 09:20
not that familiar with sub-classing, but would it also sub-classing i would have to use if i wanted DarkSDK to render to a part of a window that is already there? or is this not possible using DarkSDK?

i.e. using a resource file that has a window (form) with windows controls, and just an area of that window is actually DarkSDK, like you would see in a level editor or something (would use the commercial version of DarkSDK because the licence allows you to create anything )


P4 3.5 GHz HT, 1 GHz FSB, 1 GB PC4000, ATI Radeon 9800XT
OSX Using Happy Dude
19
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 15th May 2005 20:23
I use the following in my AtomZ puzzle game (http://homepages.nildram.co.uk/~nickk) to sub-class the window :



With EditSubclassProc handling all the Windows messages



Visit http://homepages.nildram.co.uk/~nickk
Calm down dear! Its only The Unofficial DB Sci-Fi Con...
http://spaces.msn.com/members/BouncyBrick/

Login to post a reply

Server time is: 2023-02-06 20:48:14
Your offset time is: 2023-02-06 20:48:14