Resizable windows
BlitzMax Forums/BlitzMax Programming/Resizable windows
| ||
Is there a way to create a resizable graphics window (without using MaxGUI, only the Max2D stuff)? I don't see any options for Graphics objects being resizable and so forth, other than the ability to select a resolution at object creation time. What I want to be able to do is grab a corner with my mouse, and have it change the window size and viewport, but the corners are non-interactive when I make a graphics object. Am I missing something significant here? |
| ||
bump |
| ||
1. No. 2. Bumping is rude. |
| ||
In regular BlitzMax without MaxGUI you only have a basic window, absolutely no optional features. You would have to do api calls to the operating system, to tap into the window object and change it. |
| ||
Try this :Const GWL_STYLE = -16 Const WS_SIZEBOX=$40000 Const SWP_FRAMECHANGED=$0020 Const SWP_HIDEWINDOW=$0080 Local old:Int=GetWindowLongA(win,GWL_STYLE) Local newstyle:Int=old & WS_SIZEBOX Local style:Int=SetWindowLongA(win,GWL_STYLE,newstyle) SetWindowPos(win,HWND_TOP,100,100,640,480,SWP_FRAMECHANGED|SWP_HIDEWINDOW) ShowWindow(win,1) Untested, but I think that should work. I think I've included all the constants which BMax doesn't already set too, but correct me if I'm wrong. |
| ||
...Or use the code I've provided in your icon thread (in MakeObject.zip)...SetWindow(WS_MINIMIZEBOX | WS_SIZEBOX) ?? |