I get the same size.
Btw "Hello world" code doesn't produce a false alarm anymore. Maybe an def. update of the AV might caused it.
But another code with Winapi calls produces an alert when compiling it as x86, but not on x64 compilation.
Code: Select all
#Include "fbgfx.bi"
#Include "windows.bi"
Using FB
#Define Alpha(colors) ((colors Shr 24) And 255)
#Define Red(colors) ((colors Shr 16) And 255)
#Define Green(colors) ((colors Shr 8) And 255)
#Define Blue(colors) (colors And 255)
Dim As Uinteger xres = 600, yres = 600
Dim As String sTitle = "Drag the points With the mouse"
Dim evt As Event
Screencontrol FB.SET_DRIVER_NAME, "GDI"
Screenres xres, yres, 24, 1, GFX_HIGH_PRIORITY Or GFX_NO_SWITCH
Windowtitle sTitle
Dim As HWND hHWND
Screencontrol(GET_WINDOW_HANDLE, Cast(Integer, hHWND))
Dim as BITMAPINFO tBITMAP
With tBITMAP.bmiheader
.biSize = Sizeof(BITMAPINFOHEADER)
.biWidth = xres
.biHeight = -yres
.biPlanes = 1
.biBitCount = 32
.biCompression = BI_RGB
End With
Dim As ULong Ptr aBitmap
Dim As Any Ptr hDC = GetDC(hHWND), _
hHBitmap = CreateDIBSection(hDC, @tBITMAP, DIB_RGB_COLORS, @aBitmap, NULL, NULL), _
hGfxDC = CreateCompatibleDC(hDC), _
hObjOld = SelectObject(hGfxDC, hHBitmap), _
hPen = GetStockObject(DC_Pen), _
hPen_old = SelectObject(hGfxDC, hPen), _
hBrush = GetStockObject(DC_BRUSH), _
hBrush_Old = SelectObject(hGfxDC, hBrush)
Dim hFont As HFONT = CreateFont(24, 0, 0, 0, 0, 0, 0, 0, _
DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, DEFAULT_PITCH, "Times New Roman")
Dim As Any Ptr hObjOld2 = SelectObject(hGfxDC, hFont)
SetDCPenColor(hGfxDC, &h808080)
SetDCBrushColor(hGfxDC, &h404040)
SetTextColor(hGfxDC, &h1010FF)
SetBkMode(hGfxDC, TRANSPARENT)
SetStretchBltMode(hGfxDC, STRETCH_HALFTONE)
'TT's points
Dim As Point pts(7)={(10,10),(80,40),(40,190),(190,50),(100,170),(180,170),(100,20),(30,30)}
Var k=3.0 'blow up a Bit
For n As Long=0 To 7
pts(n).x=k*pts(n).x
pts(n).y=k*pts(n).y
Next n
#Define onscreen (mx>10) And (mx<xres-10) And (my>10) And (my<yres-10)
#Define incircle(cx,cy,radius,x,y) (cx-x)*(cx-x)+(cy-y)*(cy-y)<= radius*radius
Dim As Integer mx,my,mb
Dim Shared As RECT tRect, tRect2
#Macro DrawBezier
BitBlt(hGfxDC, 0, 0, xres, yres, hGfxDC, 0, 0, WHITENESS)
For n As Ubyte = 0 To 6
tRect.Left = pts(n).x
tRect.Top = pts(n).y
tRect.Right = pts(n).x + 10
tRect.Bottom = pts(n).y + 10
tRect2.Left = tRect.Left - 20
tRect2.Top = tRect.Top - 10
tRect2.Right = pts(n).x + 30
tRect2.Bottom = pts(n).y + 30
Ellipse(hGfxDC, tRect.Left - 5, tRect.Top - 5, tRect.Right, tRect.Bottom)
DrawText(hGfxDC, (Str(n + 1)), -1, @tRect2, DT_SINGLELINE)
Next
Polybezier(hGfxDC, @pts(0), 7)
'QA(hGfxDC, xres, yres)
BitBlt(hDC, 0, 0, xres, yres, hGfxDC, 0, 0, SRCCOPY)
#Endmacro
Do
Getmouse mx,my,,mb
If onscreen Then
If mb = 1 Then
Dim As Long x=mx,y=my,dx,dy
While mb = 1
Getmouse mx,my,,mb
For n As Long=Lbound(pts) To Ubound(pts)
If incircle(pts(n).x,pts(n).y,10,mx,my) And mb=1 Then
If mx<>x Or my<>y Then
dx = mx - x
dy = my - y
x = mx
y = my
pts(n).x=x+dx
pts(n).y=y+dy
End If
End If
Next
DrawBezier
Sleep(1, 1)
Wend
End If
Else
DrawBezier
End If
If (Screenevent(@evt)) Then
Select Case evt.Type
Case SC_ESCAPE, EVENT_WINDOW_CLOSE
SelectObject(hGfxDC, hObjOld2)
DeleteObject(hFont)
SelectObject(hGfxDC, hBrush_Old)
DeleteObject(hBrush)
SelectObject(hGfxDC, hPen_old)
DeleteObject(hPen)
SelectObject(hGfxDC, hObjOld)
ReleaseDC(hHWND, hDC)
DeleteObject(hHBitmap)
DeleteDC(hGfxDC)
Exit Do
End Select
Endif
Sleep(10, 1)
Loop