Adding minimise / maximise to window?
BlitzMax Forums/BlitzMax Programming/Adding minimise / maximise to window?
| ||
| 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. |
| ||
| With some API usage, it is possible. You could even draw those 2 buttons as graphics and send the api messages yourself. |
| ||
| 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 |
| ||
| 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? |
| ||
| 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. |
| ||
| The sad thing is, you can't sort of override it, because a syncmods breaks it? |
| ||
| http://www.blitzbasic.com/codearcs/codearcs.php?code=1595 |
| ||
| Thank you Eikon. |
| ||
| 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. |
| ||
| I used Grisu's in my Framework. Same had to be done in BlitzPLus too btw. |
| ||
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 |