Creating none rectangular window

BlitzMax Forums/BlitzMax Beginners Area/Creating none rectangular window

OK I've managed to get the border to go transparent but the main window area stays opaque...

Extern "win32"
   Function GetActiveWindow%()
   Function ShowWindow(hWnd , state)
   Function SetWindowLongA(hWnd, nIndex, dwNewLong)
   Function SetLayeredWindowAttributes(hwnd, crKey, bAlpha, dwFlags)	
EndExtern

Graphics(320,180,0)

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

Const GWL_STYLE = -16
Const GWL_EXSTYLE = $FFFFFFEC

Const WS_BORDER = $800000
Const WS_EX_LAYERED = $80000
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_EX_LAYERED


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

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

SetWindowLongA(win, -20,  $80000)

SetLayeredWindowAttributes(win, 0,100,2)

ShowWindow(win , 1)

SetAlpha(0.5)

Repeat

	DrawText "What No Borders",0,0 

Flip()

Until KeyHit(KEY_ESCAPE)

End


Note that the code is based on some snippets dragged together so I could be missing the point here, can anyone provide additional help/guidance/advice?

Regards