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.

DarkBASIC Professional Discussion / making a fixed-size window ??

Author
Message
tiresius
23
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 28th Jun 2003 08:19
Hello everybody.

I'd like to make a fixed-size window (640x480, or 800x600, etc.) but it looks like in Windowed Mode you can still change the size of the window... From the commands list it's not obvious how to make it fixed, but then again a lot of things aren't obvious to me these days.

Is there a way to do this in DBPro?
Nilrem
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 28th Jun 2003 12:09 Edited at: 28th Jun 2003 12:15
I've never wanted to do this myself so I wouldn't know, however perhaps it is possible to have somewhere in your main loop a check for the window dimensions (and depth if you would like) and if they change just set them back.



I hear and I forget. I see and I remember. I do and I understand.
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 28th Jun 2003 13:09
What you could do is create a DLL that you pass the HWND handle to. Then, using various API calls, you can then force the window to a given size. The only problem is that it will have to be called every loop.

Alternatively, you can create an EXE, and get it to be sub-classed from the DBPro program. You would then have access to the message pump, and thus you can then change the window size in the WM_SIZE message.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Jun 2003 13:10 Edited at: 28th Jun 2003 13:11
You can use the SET WINDOW LAYOUT command to remove the icons from your title bar - this also seems to remove the ability to resize the window with the mouse.

SET WINDOW LAYOUT 0, 1, 0

There seems to be a bug with this command though - I couldn't get it to restore the icons.
Bloodshot
23
Years of Service
User Offline
Joined: 7th Apr 2003
Location: United Kingdom
Posted: 29th Jun 2003 00:26 Edited at: 29th Jun 2003 00:32
I also encounter that "no title bar" bug IanM, when creating a window with a height of 480 pixels.

It works with less height though:

Login to post a reply

Server time is: 2026-07-17 03:59:17
Your offset time is: 2026-07-17 03:59:17