viewtopic.php?f=6&t=26381#p145347
pude incrustar los png en mi exe, y luego usarlos en lugar de los archivos directamente.
mil gracias por tu info manuel.
- Code: Select all Expand view
DEFINE BITMAP oBmpFon
DEFINE BITMAP oBmpLog
oBmpFon:hBitmap := FWPng( "PNG_FONDO" )
oBmpLog:hBitmap := FWPng( "PNG_LOGO" )
DEFINE WINDOW oMainW ;
FROM 01, 01 TO 24, 80 ;
TITLE "Sistema de control de empleados extranjeros - [ EXPATS ) v1.0 ]"
oMainW:SetIcon( GetIcon( "EXPATS" ) )
oMainW:SetMenu( CrearMenu() )
oMainW:SetFont( oFontW )
CrearBarraBotones( oMainW )
DEFINE MSGBAR oMsgBar ;
OF oMainW ;
PROMPT "Seleccione una opcion del menu o de la barra de herramientas." ;
NOINSET ;
KEYBOARD ;
2010
ACTIVATE WINDOW oMainW ;
ON PAINT Fondo( hDC, oMainW, oBmpFon, oBmpLog ) ;
VALID MsgNoYes( "Desea salir de la aplicación?", "Seleccione" ) ;
MAXIMIZED
- Code: Select all Expand view
PROCEDURE BmpTiled( hDC, oMainD, oBmpTiled )
LOCAL nWidth := oMainD:nWidth()
LOCAL nHeight := oMainD:nHeight()
LOCAL nBmpWidth := 0
LOCAL nBmpHeight := 0
LOCAL nRow := 0
LOCAL nCol := 0
LOCAL n
IF HB_IsObject( oBmpTiled ) .and. oBmpTiled:hBitmap != 0
nBmpWidth := oBmpTiled:nWidth()
nBmpHeight := oBmpTiled:nHeight()
WHILE nRow < nHeight
nCol := 0
WHILE nCol < nWidth
PalBmpDraw( hDC, nRow, nCol, oBmpTiled:hBitmap )
nCol += nBmpWidth
END
nRow += nBmpHeight
ENDDO
ENDIF
RETURN
PROCEDURE Fondo( hDC, oWnd, oBmpTiled, oBmpLogo )
IF HB_IsObject( oBmpLogo ) .and. oBmpLogo:hBitmap != 0
BmpTiled( hDC, oWnd, oBmpTiled )
ABPaint( hDC , ;
( ( oWnd:nWidth() - oBmpLogo:nWidth() ) )/2, ; //:oWndClient
( ( oWnd:nHeight() - oBmpLogo:nHeight() ) )/2, ; //:oWndClient
oBmpLogo:hBitmap, 0 )
ENDIF
RETURN
FUNCTION FWPng( cResname )
LOCAL hBitmap := 0
IF FindResource( GetResources(), cResname , 10 ) != 0
hBitmap := FILoadFromMemory( cResToStr( cResname, 10 ), 10 )
ENDIF
RETURN hBitmap
- Code: Select all Expand view
PNG_FONDO 10 ".\\archivos\\fondo.png"
PNG_LOGO 10 ".\\archivos\\logo.png"
//
// Cursor resources
//
SQLWAIT CURSOR ".\\archivos\\crs_sql.cur"
//
// Icon resources
//
0EXPATS ICON ".\\archivos\\expats.ico"
EXPATS ICON ".\\archivos\\expats.ico"
//
// Manifest resources
//
1 RT_MANIFEST ".\\manifest.xml"