- Code: Select all Expand view
function Main()
local oWnd
local oImage
DEFINE WINDOW oWnd TITLE "Testing GDI+ Class" FROM 5,5 TO 600, 800 PIXEL
@ 3, 38 BITMAP oimage File "hola" size 120,120 of oWnd // cargamos la imagen en vacio.
ACTIVATE WINDOW oWnd on init cogeimagen() ;
ON PAINT Gditest( oImage )
return nil
function Gditest( oImage )
// local cfile:= cGetfile("escoge una imagen") // funciona también con png
local cFile := "c:\fwh\bitmaps\pngs\image6.png"
local obmp:= gdiBmp():new( cFile )
oImage:hBitmap := GDIPLUSCREATEHBITMAPIMAGE( obmp:hbmp )
oImage:HasAlpha()
oimage:refresh()
Return nil