when I put the bmp near to another the second bmp erase the first
// The Resource :
REDEFINE BITMAP oBMP4 ID 340 ADJUST RESOURCE "Blanc" OF oDlg // any Resource will be replaced with new BMP
oBMP4:bPainted := {|hDC| DRAW_BTILE( oBMP4, hDC, oTextfont, c_path + "\images\USER.BMP", ;
"Text-Test", 0, 16777215 ) }
// ---------- Bitmap -TILED with Text if needed on a BMP-resource --------------
FUNCTION DRAW_BTILE( oBitmap, hDC, oTextfont, cBitmap, cTitle, nLeft, nTColor )
LOCAL oImage, nRow := 0, nCol := 0, n
IF FILE( cBitmap )
DEFINE BITMAP oImage FILENAME cBitmap
aRect := GETCLIENTRECT( oBitmap:hWnd )
nHeight := oImage:nHeight
nWidth := oImage:nWidth
IF aRect[3] > 0
DO WHILE nRow < aRect[3]
nCol = 0
DO WHILE nCol < aRect[4]
PalBmpDraw( hDC, nRow, nCol, oImage:hBitmap ) // oBitmap:GETDC()
nCol += nHeight
ENDDO
nRow += nWidth
ENDDO
ELSE
MsgAlert( "Not possible to use Picture " + CRLF + ;
cBitmap + CRLF + ;
"for TILED-selection !", "ATTENTION" )
ENDIF
// Part : Text define
// ---------------------
hOldFont := SelectObject( hDC, oTextFont:hFont )
nTXTLG := GettextWidth( hDC, cTitle )
nBMPLONG := oBitmap:Super:nWidth()
nBMPHIGHT := oBitmap:Super:nHeight()
nFONTHIGHT := oTextFont:nInpHeight * -1
IF nLEFT = 0
nLEFT := (nBMPLONG - nTXTLG) / 2
ENDIF
nNEWHIGHT := nFONTHIGHT
nTOP := (nBMPHIGHT - nNEWHIGHT) / 2
SetTextColor( hDC,nTColor)
SetBkMode( oBitmap:hDC, 0 )
TextOut( hDC, nTOP, nLEFT, cTitle )
oBitmap:ReleaseDC()
ELSE
IF !EMPTY(cBitmap)
MsgAlert( "File : " + cBitmap + CRLF + ;
"does not exist" + CRLF + ;
"to create Background !", "ATTENTION" )
ENDIF
ENDIF
RETURN( NIL )
MdaSolution wrote:Daniel,
I trying that sample your test but
it is wrong because when you move an object it not erase the background
Do you Know roomaranger application ? http://www.roomarranger.com/
the sample game.prg of fwh make the ball transparent
Daniel Garcia-Gil wrote:the transparences come from brush parent not from image background or over other image
DEFINE BRUSH oBrush;
FILE "..\bitmaps\backgrnd\beach.bmp"
MdaSolution wrote:I try with sbutton Release 7.0 But I think there is a problem because when I use design clause it draw the rectangule of checkdots bad
I use then an action to refresh the dialog ( and the bitmaps I drawing ) but it refresh also the ribbon and it make a flash on the dialog
MdaSolution wrote:I sent you a message with test sample where you can see the error
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 98 guests