Can I set the position of the window?
BlitzMax Forums/BlitzMax Beginners Area/Can I set the position of the window?
| ||
Pretty straightforward--is there a way to set the position of the window? |
| ||
Of the window created by a Graphics call? In that case, yes.. but you'll need to do some Windows API stuff. |
| ||
Thank you, I got it figured out. I never knew how easy it was to access the Windows API from BlitzMax. Here's what I came up with in case anybody else has the same question. Extern "win32" Function GetActiveWindow:Byte Ptr() Function SetWindowPos:Int(hWnd:Byte Ptr, hWndInsertAfter:Byte Ptr, X:Int, Y:Int, CX:Int, CY:Int, Flags:Int) EndExtern Local WindowX:Int = 100 Local WindowY:Int = 100 SetWindowPos(GetActiveWindow(), Byte Ptr(0), WindowX, WindowY, 0, 0, $0001) |
| ||
Andrew, are you using multiple windows? Just curious. Would be nice to have this added to MaxGUI or at least a cross-platform solution. |
| ||
Nope, just one. |