STATIC FUNCTION BRW_BACKGRD( oLbx0 )
Local oBrush
oLbx0:SetBackGround( ) // !!!!!!!!
DEFINE BRUSH oBrush FILENAME LOGO1
oLbx0:SetBackGround( oBrush )
RELEASE BRUSH oBrush
oLbx0:Refresh()
return nil
if lStretch
...
else
PalBmpDraw( hDC, nBmpRow, nBmpCol,;
aBitmap[ BITMAP_HANDLE ],;
aBitmap[ BITMAP_PALETTE ],;
aBitmap[ BITMAP_WIDTH ],;
aBitmap[ BITMAP_HEIGHT ];
,, .t., aColors[ 2 ] )
endif
nOldColor := SetBkColor( hDC, nRGB( 255, 255, 255 ) )
TransBmp( aBitmap[ BITMAP_HANDLE ], aBitmap[ BITMAP_WIDTH ], aBitmap[ BITMAP_HEIGHT ],;
aBitmap[ BITMAP_ZEROCLR ], hDC, nRectCol, nRow, Min( nRectWidth,::oBrw:BrwWidth() - nRectCol - 4 ), ;
nRectHeight - nRow )
SetBkColor( hDC, nOldcolor )
nOldColor := SetBkColor( hDC, nRGB( 255, 255, 255 ) )
TransBmp( aBitmap[ BITMAP_HANDLE ], aBitmap[ BITMAP_WIDTH ], ;
aBitmap[ BITMAP_HEIGHT ],;
aBitmap[ BITMAP_ZEROCLR ], hDC, nRectCol, nRow, ;
aBitmap[ BITMAP_WIDTH ], ;
aBitmap[ BITMAP_HEIGHT ] )
SetBkColor( hDC, nOldcolor )
if lStretch
nOldColor := SetBkColor( hDC, nRGB( 255, 255, 255 ) )
TransBmp( aBitmap[ BITMAP_HANDLE ], aBitmap[ BITMAP_WIDTH ], aBitmap[ BITMAP_HEIGHT ],;
aBitmap[ BITMAP_ZEROCLR ], hDC, nRectCol, nRow, Min( nRectWidth,::oBrw:BrwWidth() - nRectCol - 4 ), ;
nRectHeight - nRow )
SetBkColor( hDC, nOldcolor )
else
nOldColor := SetBkColor( hDC, nRGB( 255, 255, 255 ) )
TransBmp( aBitmap[ BITMAP_HANDLE ], aBitmap[ BITMAP_WIDTH ], aBitmap[ BITMAP_HEIGHT ],;
aBitmap[ BITMAP_ZEROCLR ], hDC, nBmpCol, nBmpRow, aBitmap[ BITMAP_WIDTH ], ;
aBitmap[ BITMAP_HEIGHT ] )
SetBkColor( hDC, nOldColor )
endif
Antonio Linares wrote:1. oBrush is not released. Must be released by the programmer.
REDEFINE BITMAP oBtn ID 307 NAME "LIJST" OF oDlg
oBtn:oCursor:=TCursor():New(,"HAND")
Antonio Linares wrote:In that case, no, because the control will destroy it.
Remember not to share the same cursor for different controls, because it a control destroys it, it will be no longer valid for the other controls.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 37 guests