Antonio,
How replace a oBmp1 to a Image png (Transparent)
( i don't convert png to bmp, i realy want use a png image... )
thanks
lailton.webmaster wrote:Daniel,
look this:
look this that you will see the problem.
You think that fivewin can have comand native to use PNG ? because it use DLL freeimage, i think that it´s time of
fivewin have it native.
thanks so much for your help.
Note: ( Itryed too ON PAINT PalBmpDraw( hDC, 0, 0, oBmp1:hBitmap ) more too no work fine.. )
#include "FiveWin.ch"
function Main()
local oWnd, oBmp1
DEFINE WINDOW oWnd STYLE WS_POPUP COLOR CLR_WHITE,CLR_WHITE
oBmp1:=TImage():new(0,0,120,125,,"test.bmp",.t.,ownd)
oBmp1:lTransparent:=.t.
oWnd:Center()
SetTransparent( oWnd )
ACTIVATE WINDOW oWnd ON PAINT PaintTransparent( hDC, oBmp1:hBitmap, 0, 0 )
oBmp1:End()
return nil
//---------------------------------------------------------------------------------------------------//
#define LWA_COLORKEY 1
#define GWL_EXSTYLE -20
#define WS_EX_LAYERED 524288
//---------------------------------------------------------------------------------------------------//
STATIC FUNCTION SETTRANSPARENT( oDlg )
SETWINDOWLONG( oDlg:hWnd, GWL_EXSTYLE, NOR( GETWINDOWLONG( oDlg:hWnd, GWL_EXSTYLE ), WS_EX_LAYERED ) )
SETLAYEREDWINDOWATTRIBUTES( oDlg:hWnd, CLR_WHITE,, LWA_COLORKEY )
RETURN NIL
//---------------------------------------------------------------------------------------------------//
function PaintTransparent( hDC, hBitmap, nRow, nCol )
local hBmpOld := SelectObject( hDC, hBitmap )
local nZeroZeroClr := GetPixel( hDC, 0, 0 )
local nOldClr
SelectObject( hDC, hBmpOld )
nOldClr = SetBkColor( hDC, CLR_WHITE )
TransBmp( hBitmap, nBmpWidth( hBitmap ), nBmpHeight( hBitmap ), nZeroZeroClr, hDC, nRow, nCol, nBmpWidth( hBitmap ), nBmpHeight( hBitmap ) )
SetBkColor( hDC, nOldClr )
return nil
//---------------------------------------------------------------------------------------------------//
lailton.webmaster wrote:that program you use to convert png to bmp ?
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 49 guests