Creating a window without borders

Miscellaneous Forums/Win32 Discussion/Creating a window without borders

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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