Api SetWindowPos and style

BlitzPlus Forums/BlitzPlus Programming/Api SetWindowPos and style

Never had an issue with menu'd windows that I know of. Here's the code I used to make a window fullscreen, see if it works for you.

;.lib "user32.dll"
;SetWindowPos%(hWnd%,hAfter%,x%,y%,cx%,cy%,flags%)

SetWindowPos QueryObject(Window(0), 1), -1, 0, 0, ClientWidth(Desktop()), ClientHeight(Desktop()), 0
* edit * Just tested it and it's giving me problems with the status bar too. Seeing if I can come up with a fix...

* edit 2 *
Found a fix:
;.lib "user32.dll"
;GetActiveWindow%()
;SetWindowPos%(hWnd%,hAfter%,x%,y%,cx%,cy%,flags%)

test = CreateWindow("Test",0,400,400,100,0,7 + 8)
hwnd = GetActiveWindow()

Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = 1
Const SWP_NOMOVE = 2
Const SWP_NOACTIVATE = 16
Const SWP_SHOWWINDOW = 64

SetWindowPos hwnd, HWND_TOPMOST, 0, 0, ClientWidth(Desktop()), ClientHeight(Desktop()), 0

Repeat: Until WaitEvent() = $803
Looks like QueryObject doesn't return a proper hWnd on status windows.

* edit 3 *
You're welcome, Richard :)