Graphics window with no border.

BlitzMax Forums/BlitzMax Programming/Graphics window with no border.

Is it possible to make a Max2D window without border ?

Sveinung

No

Yes!

Look up with Windows API commands for GetWindowLong and SetWindowLong.

How do you think I do borderless windows with igLoader?

I'll give it a try...

Thanks Indiepath

Sveinung

I emailed ya, here is the code for others



Extern "win32"
   Function GetActiveWindow%()
   Function ShowWindow(hWnd,state)
EndExtern

Graphics(320,180,0)

Local win=GetActiveWindow()
ShowWindow(win,False)

Const GWL_STYLE = -16

Const WS_BORDER = $800000
Const WS_CAPTION =$C00000
Const SWP_FRAMECHANGED = $0020
Const SWP_SHOWWINDOW = $0040
Const SWP_HIDEWINDOW =     $0080

Local old:Int=GetWindowLongA(win,GWL_STYLE)

Local newstyle:Int=old & WS_BORDER & ~WS_CAPTION

Local style:Int=SetWindowLongA(win,GWL_STYLE,newstyle)

SetWindowPos(win,HWND_TOP,100,100,320,180,SWP_FRAMECHANGED|SWP_HIDEWINDOW);

ShowWindow(win,1)

Repeat

	DrawText "What No Borders",0,0 

Flip()

Until KeyHit(KEY_ESCAPE)

End


thanks for that indipath lets how that makes its way to the official mods

@Chris, I doubt this will.