by mastintin » Tue May 28, 2013 7:27 am
La mejora consiste en añadir el Metodo
cGenprg ( que no tiene ) :
- Code: Select all Expand view
METHOD New( )
...
::cVarName := "oBmp" + ::GetCtrlIndex()
...
Return nil
METHOD cGenPRG( lDlgUnits ) CLASS TBitmap
local nFactorX, nFactorY
local cTop, cLeft, cWidth, cHeight
local cCode
LOCAL cBmpCode:= ""
DEFAULT lDlgUnits := .f.
nFactorX = If( lDlgUnits, 4 / nLoWord( GetDlgBaseUnits() ), 1 )
nFactorY = If( lDlgUnits, 8 / nHiWord( GetDlgBaseUnits() ), 1 )
cTop = LTrim( Str( Int( ::nTop * nFactorX ) ) )
cLeft = LTrim( Str( Int( ::nLeft *nFactorY ) ) )
cWidth = LTrim( Str( INT (::nWidth * nFactorX ) ))
cHeight = LTrim( Str( INT ( ::nHeight *nFactorY) ) )
if ! Empty( ::cResName )
cBmpCode:= ' RESNAME "' + ::cResName +'" '
else
cBmpCode:= ' FILENAME "' + ::cBmpFile+'" '
endif
cCode := CRLF + " @ " + cTop + ", " + ;
cLeft + ' BITMAP '+::cVarname+cBmpcode + ;
' SIZE ' + cwidth + ", " + cHeight + " ADJUST NOBORDER PIXEL OF oWnd" + CRLF
Return cCode