Adding minimise / maximise to window?

BlitzMax Forums/BlitzMax Programming/Adding minimise / maximise to window?

Robert Cummings(Posted 2006) [#1]
In maxgui you can add this but it adds an annoying resize bar. I would also like to use this with just "graphics" if possible and not maxgui...

I own maxgui btw so its not a problem if I have to use it.


Dreamora(Posted 2006) [#2]
With some API usage, it is possible.

You could even draw those 2 buttons as graphics and send the api messages yourself.


TartanTangerine (was Indiepath)(Posted 2006) [#3]
This is for Windows only, I have not looked at the Mac source but it will be something similar.

Go to d3d7graphics.bmx and change line 74 to read
style=WS_VISIBLE|WS_CAPTION|WS_SYSMENU|WS_MAXIMIZEBOX|WS_MINIMIZEBOX


A full list of styles can be found here : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/WindowsUserInterface/Windowing/Windows/WindowReference/WindowStyles.asp


Robert Cummings(Posted 2006) [#4]
Thanks Indie :) any reason why this isn't on as standard...? I mean windowed mode obviously means the person wants to do other stuff too usually doesn't it?


TartanTangerine (was Indiepath)(Posted 2006) [#5]
No idea but if you scroll up to line 20 in that file you find the function that controls all the messages. I think it may also be possible somewhere in here to allow for dynamically resized windows.


Robert Cummings(Posted 2006) [#6]
The sad thing is, you can't sort of override it, because a syncmods breaks it?


Eikon(Posted 2006) [#7]
http://www.blitzbasic.com/codearcs/codearcs.php?code=1595


Robert Cummings(Posted 2006) [#8]
Thank you Eikon.


Dreamora(Posted 2006) [#9]
Would assume its standard because the window mode was never meant to be a true mode for graphics, just a debug mode.

A thing that makes this feeling stronger is the never "empty" list of DX + windowed / canvas problems / bugs.


Grey Alien(Posted 2006) [#10]
I used Grisu's in my Framework. Same had to be done in BlitzPLus too btw.


assari(Posted 2006) [#11]
With MAXGUI this would be one way
Local style = WINDOW_TITLEBAR|WINDOW_RESIZABLE

MyFirstWindow:TGadget=CreateWindow("My Window", 200,200,320,240,Null,style)

Repeat
 WaitEvent()
Until EventID()=EVENT_WINDOWCLOSE

End