transparent ???

transparent ???

Postby Silvio » Tue Mar 09, 2010 8:20 pm

Image

why the bitmap is not transparent ???
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: transparent ???

Postby Silvio » Wed Mar 10, 2010 4:51 pm

ANY SOLUTION ?


THIS THE SAMPLE TEST
Code: Select all  Expand view
#include 'fivewin.ch'
#include 'xbrowse.ch'

function Main()

   local oDlg, oBrw, oFont
   local nRecSel

   USE CUSTOMER ALIAS CUST
   nRecSel  := CUST->( RecNo() )

   DEFINE FONT oFont NAME 'Tahoma' SIZE 0, -14

   DEFINE DIALOG oDlg SIZE 640,440 PIXEL ;
      FONT oFont TITLE 'XBrowse Gradient Rows'

   @ 10,10 XBROWSE oBrw OF oDlg ;
      SIZE 300,200 PIXEL ;
      AUTOCOLS ALIAS 'CUST' BACKGROUND ""

   WITH OBJECT oBrw
      :bChange          := { || nRecSel := oBrw:BookMark }
      :nRowDividerStyle := LINESTYLE_NOLINES
      :nColDividerStyle := LINESTYLE_NOLINES
      :nMarqueeStyle    := MARQSTYLE_HIGHLROW

   END

   WITH OBJECT oBrw:aCols[8]
      :AddBmpFile(".\tipo\print.bmp")
      :AddBmpFile(".\tipo\laptop.bmp")
      :cHeader  := "Married"
       :bBmpData   := { || iif( _FIELD->Married, 1, 2) }
    END

     WITH OBJECT oBrw:aCols[4]
          :AddBmpFile(".\tipo\AULE.bmp")
          :bBmpData := { || 1 }
          :bStrData := { ||  _FIELD->City}
        END


   AEval( oBrw:aCols, { |oCol| ;
      oCol:bPaintText := { |oCol, hDC, cData, aRect | ;
                           PaintCol( oCol, hDC, cData, aRect, nRecSel ) } ;
      } )

   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED

   CLOSE CUST
   RELEASE FONT oFont

return nil

static function PaintCol( oCol, hDC, cData, aRect, nRecSel )

   if nRecSel == CUST->( RecNo() )
      GradientFill( hDC, aRect[ 1 ] - 2, aRect[ 2 ] - 3, aRect[ 3 ] + 1, aRect[ 4 ] + 5,;
                    { { 1, RGB( 220, 235, 252 ), RGB( 193, 219, 252 ) } }, .T. )
      SetBkMode( hDC, 1 )
      RoundBox( hDC, 2, aRect[ 1 ] - 1, WndWidth( oCol:oBrw:hWnd ) - 22, aRect[ 3 ] + 1, 2, 2,;
                RGB( 235, 244, 253 ), 1 )
      RoundBox( hDC, 1, aRect[ 1 ] - 2, WndWidth( oCol:oBrw:hWnd ) - 21, aRect[ 3 ] + 2, 2, 2,;
                RGB( 125, 162, 206 ), 1 )
   endif

   SetTextColor( hDC, 0 )
   DrawTextEx( hDC, cData, aRect, oCol:nDataStyle )

return nil
 #pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>

HB_FUNC( ROUNDBOX )
{
   HDC hDC = ( HDC ) hb_parni( 1 );
   HBRUSH hBrush = ( HBRUSH ) GetStockObject( 5 );
   HBRUSH hOldBrush = ( HBRUSH ) SelectObject( hDC, hBrush );
   HPEN hPen, hOldPen ;

   if( hb_pcount() > 8 )
      hPen = CreatePen( PS_SOLID, hb_parnl( 9 ), ( COLORREF ) hb_parnl( 8 ) );
   else
      hPen = CreatePen( PS_SOLID, 1, ( COLORREF ) hb_parnl( 8 ) );

   hOldPen = ( HPEN ) SelectObject( hDC, hPen );
   hb_retl( RoundRect( hDC ,
                                 hb_parni( 2 ),
                                 hb_parni( 3 ),
                                 hb_parni( 4 ),
                                 hb_parni( 5 ),
                                 hb_parni( 6 ),
                                 hb_parni( 7 ) ) );

   SelectObject( hDC, hOldBrush );
   DeleteObject( hBrush );
   SelectObject( hDC, hOldPen );
   DeleteObject( hPen );
}

#pragma ENDDUMP




I TRY ALSO TO SEVEN WINDOWS SAME ERROR
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: transparent ???

Postby Silvio » Thu Mar 11, 2010 1:15 pm

this is the test on Windows Seven

Image


SAME ERROR

on bitmaps there is a box blue
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Marc Venken and 64 guests