I'm trying to create a small loading window without borders.
When I disable the caption (which includes the borders) on the active window, it looks like the old window rendering pane remains underneath.
This old area has either garbage or a blank area. Since it includes the dimensions of the old caption and border, it spills out to the right and bottom of the active area.
Not sure if this is a Max bug or I'm missing a WinAPI call.
Thanks!
Strict
Graphics 320, 200
SetClsColor 0,64,0
RemoveBorder()
DrawMsg("Press Key to flip once")
DrawMsg("Press Key to Exit")
Function RemoveBorder()
Local hWnd:Long = GetActiveWindow()
Local tmp:Long = GetWindowLongA( hWnd, GWL_STYLE )
tmp :~ WS_CAPTION
SetWindowLongA( hWnd, GWL_STYLE, tmp )
End Function
Function DrawMsg (msg$)
Cls
SetColor 255,255,255
DrawText msg$, 50, 50
Flip
WaitKey()
EndFunction
|