FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bug in radio button transparence
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in radio button transparence
Posted: Tue Jan 06, 2009 11:08 PM
In the following sample the SAY is transparent while the RADIO isn't:

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL nVar

    LOCAL hBmp := READBITMAP( 0, "c:\fwh\bitmaps\fivewin.bmp" )

    DEFINE DIALOG oDlg;
           TRANSPARENT

    @ 1, 5 SAY "This is a test"

    @ 2, 5 RADIO nVar;
           PROMPT "Test1", "Test2"

    ACTIVATE DIALOG oDlg;
             ON PAINT PALBMPDRAW( hDC, 0, 0, hBmp );
             CENTER

    DELETEOBJECT( hBmp )

    RETURN NIL


EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Bug in radio button transparence
Posted: Wed Jan 07, 2009 12:34 AM
Enrico,

Transparency has to be used with brushes. It is a Windows API limitation, not a bug.

This is the right way to do it:
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBrush

    LOCAL nVar

    DEFINE BRUSH oBrush FILENAME "c:\fwh\bitmaps\fivewin.bmp"

    DEFINE DIALOG oDlg;
           TRANSPARENT BRUSH oBrush

    @ 1, 5 SAY "This is a test"

    @ 2, 5 RADIO nVar;
           PROMPT "Test1", "Test2"

    ACTIVATE DIALOG oDlg

    oBrush:End()

    RETURN NIL

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bug in radio button transparence
Posted: Wed Jan 07, 2009 08:18 AM

Ok, thank you.

EMG

Continue the discussion