Graphics window with no border.

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

Sveinung(Posted 2006) [#1]
Is it possible to make a Max2D window without border ?

Sveinung


Dreamora(Posted 2006) [#2]
No


TartanTangerine (was Indiepath)(Posted 2006) [#3]
Yes!

Look up with Windows API commands for GetWindowLong and SetWindowLong.

How do you think I do borderless windows with igLoader?


Sveinung(Posted 2006) [#4]
I'll give it a try...

Thanks Indiepath

Sveinung


TartanTangerine (was Indiepath)(Posted 2006) [#5]
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



Chris C(Posted 2006) [#6]
thanks for that indipath lets how that makes its way to the official mods


TartanTangerine (was Indiepath)(Posted 2006) [#7]
@Chris, I doubt this will.