Hi,
This is the way to draw PNG images using FWH and freeimage:
hBmp = PngToBitmap( hDC, "c:\myfile.png" )
ABPaint( hDC, 10, 10, hBmp )
---cut---
HB_FUNC( PNGTOBITMAP )
{
HDC hDC = ( HDC ) hb_parnl( 1 );
FIBITMAP *dib;
FREE_IMAGE_FORMAT fiSource;
fiSource = FreeImage_GetFileType( ( LPSTR ) hb_parcx( 2 ), 0 );
dib = FreeImage_Load( fiSource, ( LPSTR ) hb_parcx( 2 ), 0 );
hb_retnl( ( LONG ) CreateDIBitmap( hDC, FreeImage_GetInfoHeader( dib ), CBM_INIT, FreeImage_GetBits( dib ), FreeImage_GetInfo( dib ), DIB_RGB_COLORS ) );
}
---cut---
Regards,
Toninho.