IF !Empty( hBmp )
if SetAlpha() .and. ::aAlpha[ nBtn ]
ABPaint( ::hDC, if( ::lAdjust, nAdjust, nBmpLeft+nAdjust), if( ::lAdjust, nAdjust, nBmpTop+nAdjust ), hBmp, ::nAlphaLevel() )
elseif IsAppThemed()
if !::lTransparent
PalBtnPaint( ::hWnd, if( ::lMOver .and. !Empty( ::hBitmap4 ), ::hBitmap4, ::hBitmap1 ),;
if( ::lMOver .and. !Empty( ::hBitmap4 ), ::hPalette4, ::hPalette1 ),;
if ( ::lAdjust .and. empty( ::hBitmap2 ), ::hBitmap1,::hBitmap2 ),;
if ( ::lAdjust .and. empty( ::hBitmap2 ), ::hPalette1,::hPalette2),;
::hBitmap3, ::hPalette3, ::lPressed, ::lAdjust, ::lBorder,;
::oPopup != nil,;
::nClrPane, if ( ::cCaption == "...", ::cCaption,) , ::nLayout,;
If( ::oFont != nil, ::oFont:hFont, 0 ),;
If( ValType( ::nClrText ) == "B", Eval( ::nClrText, ::lMOver ), ::nClrText ), ::hDC,;
Upper( ::oWnd:ClassName() ) != "TBAR" )
else
hBmpOld = SelectObject( ::hDC, hBmp )
nZeroZeroClr = GetPixel( ::hDC, 0, 0 )
SelectObject( ::hDC, hBmpOld )
nOldClr = SetBkColor( ::hDC, nRGB( 255, 255, 255 ) )
TransBmp( hBmp, nBmpWidth, nBmpHeight, nZeroZeroClr, ::hDC,;
if( ::lAdjust, nAdjust, nBmpLeft + nAdjust ), ;
if( ::lAdjust, nAdjust, nBmpTop + nAdjust ),;
if (::lAdjust, ::nWidth, nBmpWidth ) ,;
if( ::lAdjust, ::nHeight, nBmpHeight ) )
SetBkColor( ::hDC, nOldClr )
endif
else
hBmpOld = SelectObject( ::hDC, hBmp )
nZeroZeroClr = GetPixel( ::hDC, 0, 0 )
SelectObject( ::hDC, hBmpOld )
nOldClr = SetBkColor( ::hDC, nRGB( 255, 255, 255 ) )
TransBmp( hBmp, nBmpWidth, nBmpHeight, nZeroZeroClr, ::hDC,;
if( ::lAdjust, nAdjust, nBmpLeft + nAdjust ), ;
if( ::lAdjust, nAdjust, nBmpTop + nAdjust ),;
if (::lAdjust, ::nWidth, nBmpWidth ) ,;
if( ::lAdjust, ::nHeight, nBmpHeight ) )
SetBkColor( ::hDC, nOldClr )
endif
else