se le hizo un seguimiento al HB_OUT.TXT en el cual el error da en METHOD LoadBitmaps
Called from PALBMPNEW(0)
Called from WNDREADPALBMPEX(588) in .\source\function\IMGTXTIO.PRG
Called from (b)TWINDOW(551) in .\source\classes\WINDOW.PRG
Called from TBTNBMP:READPALBMPEX(0) in .\source\classes\WINDOW.PRG
Called from TBTNBMP:SETIMAGES(1004) in .\source\classes\BTNBMP.PRG
Called from TBTNBMP:LOADBITMAPS(1031) in .\source\classes\BTNBMP.PRG
revisando con versiones anteriores
- Code: Select all Expand view RUN
METHOD LoadBitmaps( cResName1, cResName2, cBmpFile1, cBmpFile2,;
cResName3, cBmpFile3, cResName4, cBmpFile4 ) CLASS TBtnBmp
local aBmpPal
if ! Empty( cResName1 )
aBmpPal = PalBmpLoad( cResName1 )
::hBitmap1 = aBmpPal[ 1 ]
::hPalette1 = aBmpPal[ 2 ]
::HasAlpha( ::hBitmap1, BTN_UP )
endif
if ! Empty( cResName2 )
aBmpPal = PalBmpLoad( cResName2 )
::hBitmap2 = aBmpPal[ 1 ]
::hPalette2 = aBmpPal[ 2 ]
::HasAlpha( ::hBitmap2, BTN_DOWN )
endif
if ! Empty( cResName3 )
aBmpPal = PalBmpLoad( cResName3 )
::hBitmap3 = aBmpPal[ 1 ]
::hPalette3 = aBmpPal[ 2 ]
::HasAlpha( ::hBitmap3, BTN_DISABLE )
endif
if ! Empty( cResName4 )
aBmpPal = PalBmpLoad( cResName4 )
::hBitmap4 = aBmpPal[ 1 ]
::hPalette4 = aBmpPal[ 2 ]
::HasAlpha( ::hBitmap4, BTN_OVERMOUSE )
endif
if ! Empty( cBmpFile1 )
if File( cBmpFile1 )
::cBmpFile1 = cBmpFile1
aBmpPal = PalBmpRead( ::GetDC(), cBmpFile1 )
::hBitmap1 = aBmpPal[ 1 ]
::hPalette1 = aBmpPal[ 2 ]
::HasAlpha( ::hBitmap1, BTN_UP )
::ReleaseDC()
endif
endif
if ! Empty( cBmpFile2 )
if File( cBmpFile2 )
::cBmpFile2 = cBmpFile2
aBmpPal = PalBmpRead( ::GetDC(), cBmpFile2 )
::hBitmap2 = aBmpPal[ 1 ]
::hPalette2 = aBmpPal[ 2 ]
::HasAlpha( ::hBitmap2, BTN_DOWN )
::ReleaseDC()
endif
endif
if ! Empty( cBmpFile3 )
if File( cBmpFile3 )
::cBmpFile3 = cBmpFile3
aBmpPal = PalBmpRead( ::GetDC(), cBmpFile3 )
::hBitmap3 = aBmpPal[ 1 ]
::hPalette3 = aBmpPal[ 2 ]
::HasAlpha( ::hBitmap3, BTN_DISABLE )
::ReleaseDC()
endif
endif
if ! Empty( cBmpFile4 )
if File( cBmpFile4 )
::cBmpFile4 = cBmpFile4
aBmpPal = PalBmpRead( ::GetDC(), cBmpFile4 )
::hBitmap4 = aBmpPal[ 1 ]
::hPalette4 = aBmpPal[ 2 ]
::HasAlpha( ::hBitmap4, BTN_OVERMOUSE )
::ReleaseDC()
endif
endif
if ! Empty( ::hBitmap1 )
PalBmpNew( ::hWnd, ::hBitmap1, ::hPalette1 )
endif
if ! Empty( ::hBitmap2 )
PalBmpNew( ::hWnd, ::hBitmap2, ::hPalette2 )
endif
if ! Empty( ::hBitmap3 )
PalBmpNew( ::hWnd, ::hBitmap3, ::hPalette3 )
endif
if ! Empty( ::hBitmap4 )
PalBmpNew( ::hWnd, ::hBitmap4, ::hPalette4 )
endif
if ::l2007
/*
if Empty( ::hBitmap2 ) .and. ! Empty( ::hBitmap1 )
::hBitmap2 := ResizeImg( ::hBitmap1, nBmpWidth( ::hBitmap1 ) - 2, nBmpHeight( ::hBitmap1 ) - 2 )
::HasAlpha( ::hBitmap2, BTN_DOWN )
endif
if Empty( ::hBitmap3 ) .and. ! Empty( ::hBitmap1 )
::hBitmap3 := Blur( ::hBitmap1, 1 )
::HasAlpha( ::hBitmap3, BTN_DISABLE )
endif
if Empty( ::hBitmap4 ) .and. ! Empty( ::hBitmap1 )
::hBitmap4 := ResizeImg( ::hBitmap1, nBmpWidth( ::hBitmap1 ) + 6, nBmpHeight( ::hBitmap1 ) + 6 )
::HasAlpha( ::hBitmap4, BTN_OVERMOUSE )
endif
*/
endif
return nil
Versión Actual
- Code: Select all Expand view RUN
METHOD LoadBitmaps( cResName1, cResName2, cBmpFile1, cBmpFile2,;
cResName3, cBmpFile3, cResName4, cBmpFile4 ) CLASS TBtnBmp
::SetImages( IfNil( cResName1, cBmpFile1 ), IfNil( cResName2, cBmpFile2 ), ;
IfNil( cResName3, cBmpFile3 ), IfNil( cResName4, cBmpFile4 ), .f. )
/*
local aBmpPal
local cSrc
if ! Empty( cSrc := IfNil( cResName1, cBmpFile1 ) )
aBmpPal = ::ReadPalBmpEx( cSrc,,::lGDIP )
::hBitmap1 = aBmpPal[ 1 ]
::hPalette1 = aBmpPal[ 2 ]
::aAlpha[ 1 ] = aBmpPal[ 5 ]
::cBmpFile1 = If( aBmpPal[ 7 ], nil, aBmpPal[ 6 ] )
::cResName1 = If( aBmpPal[ 7 ], aBmpPal[ 6 ], nil )
endif
if ! Empty( cSrc := IfNil( cResName2, cBmpFile2 ) )
aBmpPal = ::ReadPalBmpEx( cSrc,,::lGDIP )
::hBitmap2 = aBmpPal[ 1 ]
::hPalette2 = aBmpPal[ 2 ]
::aAlpha[ 2 ] = aBmpPal[ 5 ]
::cBmpFile2 = If( aBmpPal[ 7 ], nil, aBmpPal[ 6 ] )
::cResName2 = If( aBmpPal[ 7 ], aBmpPal[ 6 ], nil )
endif
if ! Empty( cSrc := IfNil( cResName3, cBmpFile3 ) )
aBmpPal = ::ReadPalBmpEx( cSrc,,::lGDIP )
::hBitmap3 = aBmpPal[ 1 ]
::hPalette3 = aBmpPal[ 2 ]
::aAlpha[ 3 ] = aBmpPal[ 5 ]
::cBmpFile3 = If( aBmpPal[ 7 ], nil, aBmpPal[ 6 ] )
::cResName3 = If( aBmpPal[ 7 ], aBmpPal[ 6 ], nil )
endif
if ! Empty( cSrc := IfNil( cResName4, cBmpFile4 ) )
aBmpPal = ::ReadPalBmpEx( cSrc,,::lGDIP )
::hBitmap4 = aBmpPal[ 1 ]
::hPalette4 = aBmpPal[ 2 ]
::aAlpha[ 4 ] = aBmpPal[ 5 ]
::cBmpFile4 = If( aBmpPal[ 7 ], nil, aBmpPal[ 6 ] )
::cResName4 = If( aBmpPal[ 7 ], aBmpPal[ 6 ], nil )
endif
*/
return nil
El error es aqui
::SetImages( IfNil( cResName1, cBmpFile1 ), IfNil( cResName2, cBmpFile2 ), ;
IfNil( cResName3, cBmpFile3 ), IfNil( cResName4, cBmpFile4 ), .f. )
no da todo el tiempo da trabajando 1 hora o 2 horas