METHOD PAINT() //de TBtnBmp
Code: Select all
// REGF DESDE AQUI 29112006
if ::lTransparent
hBmpOld = SelectObject( ::hDC, ::hBitmap1 )
nZeroZeroClr = GetPixel( ::hDC, 0, 0 )
SelectObject( ::hDC, hBmpOld )
nOldClr = SetBkColor( ::hDC, nRGB( 255, 255, 255 ) )
TransBmp( ::hBitmap1, nBmpWidth( ::hBitmap1 ), nBmpHeight( ::hBitmap1 ), nZeroZeroClr, ::hDC,;
If( ::lPressed, 2, 1 ), If( ::lPressed, 2, 1 ),;
nBmpWidth( ::hBitmap1 ), nBmpHeight( ::hBitmap1 ) )
SetBkColor( ::hDC, nOldClr )
else
PalBtnPaint ( ::hWnd, ::hBitmap1, ::hPalette1, ::hBitmap2, ::hPalette2,;
::hBitmap3, ::hPalette3, ::lPressed, ::lAdjust, ::lBorder,;
::oPopup != nil, ::nClrPane, ::cCaption, ::nLayout,;
If( ::oFont != nil, ::oFont:hFont, 0 ), ::nClrText, ::hDC )
EndIf
Gracias