Hello,
2 functions :
1.)
NOT transparent ! bur resizing works ( adjusted to resource ).
REDEFINE IMAGE oIMG1 OF oDlg FILENAME NIL ;
ID 110 PIXEL BORDER
oIMG1:cTooltip := "Image 1l"
oIMG1:bPainted := { |hDC| ( cSize1 := DRAW_IMG(oIMG1, hDC, cImage0, ;
oSay2, oSay4, cSize1, cSize2 ), oSay1:Refresh(), oSay2:Refresh() ) }
FUNCTION DRAW_IMG( oImage, hDC, cImage, oSay2, oSay4, cSize1 )
LOCAL oImg, aRect[4], nFactor1, nFactor2, aRect
DEFINE IMAGE oImg FILENAME c_path1 + cImage
aRect := GETCLIENTRECT( oImage:hWnd )
// MsgAlert( aRect[4] ) // Resource Width
// MsgAlert( aRect[3] ) // Resource Height
nFactor1 := aRect[4] / oImg:nWidth
nFactor2 := aRect[3] / oImg:nHeight
cSize := ALLTRIM(STR(oImg:nWidth)) + "x" + ALLTRIM(STR(oImg:nHeight)) + ;
" Resize-Factor : W = " + ALLTRIM(STR(nFactor1)) + " H = " + ALLTRIM(STR(nFactor2))
IF nFactor1 > 1 .and. nFactor2 > 1
PalBmpDraw( hDC, 0, 0, oImg:hBitmap, ,oImg:nWidth, oImg:nHeight )
cSize1 := "Width : " + ALLTRIM(STR(oImg:nWidth)) + ;
" / Height : " + ALLTRIM(STR(oImg:nHeight))
ENDIF
RETURN( cSize )
I need a Function for resizing like sample 1 !
PalBmpdraw dosn't show transparent PNG's
2.)
REDEFINE IMAGE oIMG1 OF oDlg FILENAME NIL ;
ID 110 PIXEL BORDER
oIMG1:cTooltip := "Image 1l"
oIMG1:LoadImage( , c_path1 + cImage0 )
Transparent but not adjusted to resource !
Best Regards
Uwe