Alpablended-BMP on top of xBrowse-Brush or Image ?

Alpablended-BMP on top of xBrowse-Brush or Image ?

Postby ukoenig » Thu Jan 15, 2009 11:52 am

Hello,

A option in my xBrowse-Tests is to show a Alphablended-BMP inside
xBrowse on top of a Brush or Image.
I tested inside the Dialog and ONPAINT.

Is it possible ?, otherwise I have to delete this option in my tests.
In my tests, I got it allways shown on the Dialog-Background.

Image

Code: Select all  Expand view

..
oBrw5:CreateFromResource( 110 )

// Image-Brush
// ----------------
IF  nArrayPos = 3 .or. nArrayPos = 8
   DEFINE BRUSH oBrush5 FILENAME "MARBLE.bmp"
   oBrw5:SetBackGround( oBrush5 )
   RELEASE BRUSH oBrush5
   oBrw5:Refresh()
ENDIF

// Alpha-BMP
// --------------
IF  nArrayPos = 8
   hDC := oBrw5:GETDC()
*   W_ALPHA( hDC, oBrw5 )
*   oBrw5:RELEASEDC()
ENDIF

REDEFINE BUTTONBMP oButton  ID 30 OF oDlg5 ;
ACTION oDlg5:End() ;
BITMAP "Quit" PROMPT "   Exit" TEXTRIGHT

ACTIVATE DIALOG oDlg5 CENTERED ;
ON PAINT ( W_GRAD( hDC, oDlg5 ), ;
            IIF(nArrayPos = 8, ( W_ALPHA( hDC, oBrw5 ), oBrw5:RELEASEDC() ), NIL ) )

oProgFont1:End()

RETURN(  NIL )

// --------------------------

STATIC FUNCTION W_ALPHA( hDC, oWnd )
LOCAL oBmp1

DEFINE BITMAP oBmp1 FILENAME "A_LOGO.BMP"
ABPaint( hDC, 20, 20, oBmp1:hBitmap, 220 )

RETURN NIL



I tested this and the Alpha-BMP is painted inside the xBrowse,
but doesn't stay on screen ( just shown a second ) :

Code: Select all  Expand view

....
....

DEFINE BITMAP oBmp1 FILENAME "A_LOGO.BMP"

ACTIVATE DIALOG oDlg5 CENTERED ;
ON PAINT (  hDC := oBrw5:GETDC(), ;
          oBrw5:SetBackGround( ABPaint( hDC, 20, 20, oBmp1:hBitmap, 220 ) ), ;
          oBrw5:RELEASEDC() )



Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Rick Lipkin and 90 guests

cron