Post by Walt Decker on Dec 27, 2021 15:28:23 GMT -5
I know not if this has been mentioned but in the following code the vertical size of the graphic control is not honored when its parent window is resized in that direction. Looks like another bug.
'
'
GfxWide = 0
GfxHigh = 0
UpperLeftX = 50
UpperLeftY = 100
WindowWidth = DisplayWidth / 2
WindowHeight = DisplayHeight / 2
GfxWide = WindowWidth / 2
GfxHigh = WindowHeight / 2
OPEN "GFX BOX" FOR WINDOW AS #DMO
WinHndl = FN.GetHandle("DMO")
RetVal = FN.NewWin(WinHndl, GfxWide, GfxHigh)
WAIT
'-----------------------------------------------------------------
'-----------------------------------------------------------------
FUNCTION FN.CheckHandle$(Tag$)
IF LEFT$(Tag$, 1) <> "#" THEN Tag$ = "#" + Tag$
FN.CheckHandle$ = Tag$
END FUNCTION
'-----------------------------------------------------------------
'-----------------------------------------------------------------
FUNCTION FN.GetHandle(Tag$)
WinHndl = 0
Tag$ = FN.CheckHandle$(Tag$)
WinHndl = HWND(#Tag$)
FN.GetHandle = WinHndl
END FUNCTION
'-----------------------------------------------------------------
'-----------------------------------------------------------------
FUNCTION FN.NewWin(WinHndl, GfxWide, GfxHigh)
WS.BORDER = HEXDEC("&H00800000")
GfxHndl = 0
GfxWin = 0
Ux = 0
Uy = 0
Bx = 0
By = 0
PRINT GfxHigh, WindowHeight
STYLEBITS #GFX.GFX, WS.BORDER, 0, 0, 0
GRAPHICBOX #GFX.GFX, 0, 0, GfxWide, GfxHigh
WindowWidth = GfxWide
WindowHeight = GfxHigh
OPEN "GFX" FOR WINDOW AS #GFX
PRINT #GFX.GFX, "down"
PRINT #GFX.GFX, "fill black"
PRINT #GFX.GFX, "flush"
END FUNCTION
'