TO NAGES Also Windows Seven Error Bitmap on Xbrowse

TO NAGES Also Windows Seven Error Bitmap on Xbrowse

Postby MdaSolution » Sun Jul 04, 2010 5:27 pm

DEAR ANTONIO,
I THINK this error on fwh10.6 corrected .. but
Image



I have also the same error on xbrowse to show bitmap on xbrowse when I want use the windows seven effect

oCol:= oApp():oGrid:AddCol()
oCol:AddResource("sort1")
oCol:AddResource("sort2")
oCol:AddResource( 'TREE_HARD')
oCol:AddResource( 'TREE_LAPTOP' )
oCol:AddResource( 'TREE_PRINTERS' )
oCol:AddResource( 'TREE_MONITOR' )
oCol:AddResource( 'TREE_KEYBOARD' )
oCol:AddResource( 'TREE_SWITCH' )
oCol:AddResource( 'TREE_MOUSE' )
oCol:AddResource( 'TREE_POCKET' )
oCol:AddResource( 'TREE_SCANNER' )
oCol:AddResource( 'TREE_PROJECT' )
oCol:AddResource( 'TREE_VCAM' )
oCol:AddResource( 'TREE_FCAM' )
oCol:AddResource( 'TREE_CAMERA' )

oCol:bBmpData := { || AScan( aItems, Trim( (oDHard)->type )) + 2 }
* oCol:bStrData := { || (oDHard)->type}
oCol:cHeader := "Tipo"
oCol:nWidth := 60
oCol:nHeadBmpNo := 2
oCol:nHeadBmpAlign := AL_RIGHT
oCol:oDataFont := oFontGrid
oCol:bLClickHeader :={ ||(Sel_Index(3,oDHard) , oApp():oTab:nOption:=3,oApp():oTab:refresh()) }

WITH OBJECT oApp():oGrid
:bChange := { || (nRecSel := oApp():oGrid:BookMark,RefreshCont(oApp:oCont,oDHard)) }
:nRowDividerStyle := LINESTYLE_NOLINES
:nColDividerStyle := LINESTYLE_NOLINES
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:nStretchCol = STRETCHCOL_LAST
:SetBackGround(NIL,NIL)

END


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




oApp():oGrid:CreateFromCode()


....

STATIC FUNCTION PaintCol( oCol, hDC, cData, aRect, nRecSel )

if nRecSel ==(oDHard)->( 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
Last edited by MdaSolution on Wed Jul 07, 2010 6:14 am, edited 1 time in total.
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: Also Windows Seven Error Bitmap on Xbrowse

Postby MdaSolution » Mon Jul 05, 2010 6:59 am

I try also with a sample but it not run ok

Code: Select all  Expand view


#include 'fivewin.ch'
#include 'xbrowse.ch'

function Main()

   local oDlg, oBrw, oFont
   local aRowGrad, aSelGrad, aStdGrad,nRecSel

   local n := RGB( 157, 248, 255 )

   XbrNumFormat( 'E', .t. )

   aRowGrad := { { .5, RGB( 232, 241, 252 ), RGB(  232, 241, 252 ) }, ;
                 { .5, RGB( 210, 225, 244 ), RGB(  235, 243, 253 ) } }

   aSelGrad := { { .5, RGB( 255, 255, 251 ), RGB( 255, 237, 178 ) }, ;
                 { .5, RGB( 255, 218, 103 ), RGB( 255, 233, 162 ) } }

   USE CUSTOMER ALIAS CUST

   DEFINE FONT oFont NAME 'Tahoma' SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 640,440 PIXEL ;
      FONT oFont TITLE 'XBrowse Gradient Rows FWH 9.12'

   @ 10,10 XBROWSE oBrw OF oDlg ;
      SIZE -10,-10 PIXEL ;
      COLUMNS 'FIRST', 'HIREDATE', 'MARRIED', 'SALARY' ;
      ALIAS 'CUST' LINES NOBORDER

   oBrw:Married:SetCheck()  // Default FWH Bitmap is Alpha

   WITH OBJECT oBrw:First
      :AddBitmap( '\fwh\bitmaps\open2.bmp' ) // non-alpha bitmap
      :bBmpData   := { || 1 }
   END

   WITH OBJECT oBrw:HireDate
      :AddBitmap( '\fwh\bitmaps\Alphabmp\task.bmp' )  // alpha
      :bBmpData   := { || 1 }
   END

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


     WITH OBJECT oBrw
      :nStretchCol   := 1
      :nMarqueeStyle := 4
      :bClrSelFocus  := { || { CLR_BLACK, aSelGrad } }
      :bClrRowFocus  := { || { CLR_BLACK, aRowGrad } }
   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


 
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: TO NAGES Also Windows Seven Error Bitmap on Xbrowse

Postby MdaSolution » Wed Jul 07, 2010 6:15 am

NAGES CAN YOU HELP ME PLEASE?
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: TO NAGES Also Windows Seven Error Bitmap on Xbrowse

Postby nageswaragunupudi » Wed Jul 07, 2010 12:25 pm

As of now, Windows7 look implemented through oCol:bPaintText is not compatible with bitmaps in columns. This works only without bitmaps.

Reason:
bPaintText is called by every column, after painting background and bitmaps. In the bPaintText we are painting gradient background over and above the bitmaps already painted.
Also this routine is called by every column. And everytime we are overpainting all columns with out gradient painting.

Therefore this approach is not compatible with other features like bitmaps. etc. You may use this for simple listboxes.

XBrowse has not yet implemented Windows7 look natively.

Or we need to subclass xbrowse and override methods oBrw:drawline, and ocol:paintdata
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: TO NAGES Also Windows Seven Error Bitmap on Xbrowse

Postby MdaSolution » Wed Jul 07, 2010 3:43 pm

But Daniel or Antonio ( Now I not rememberwho) sad to me it was correct into the last version...
I need to show transparent bitmaps and to have alternate colors into grid
It is possible to create with xbrowse now ?
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: TO NAGES Also Windows Seven Error Bitmap on Xbrowse

Postby nageswaragunupudi » Wed Jul 07, 2010 3:51 pm

To the best of my understanding, what is improved in the latest versions is painting of bitmaps ( alpha and non-alpha ) over gradient rows.

viewtopic.php?f=6&t=18554&p=97245&hilit=DEFAULT#p97245

But the above windows7 look logic paints gradient over and above the bitmaps already painted by xbrowse.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: TO NAGES Also Windows Seven Error Bitmap on Xbrowse

Postby MdaSolution » Thu Jul 08, 2010 6:01 am

thanks Nao But this feature is need for the Windows Seven
Many customer want W7 instead Vista Windows and we must converte all applications on this system
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: TO NAGES Also Windows Seven Error Bitmap on Xbrowse

Postby jose_murugosa » Thu Jul 08, 2010 1:26 pm

It seems to be a interesting matter. :shock:
Saludos/Regards,
José Murugosa
FWH + Harbour + Bcc7. Una seda!
User avatar
jose_murugosa
 
Posts: 1144
Joined: Mon Feb 06, 2006 4:28 pm
Location: Uruguay

Re: TO NAGES Also Windows Seven Error Bitmap on Xbrowse

Postby FranciscoA » Mon Aug 02, 2010 3:31 pm

MdaSolution wrote:thanks Nao But this feature is need for the Windows Seven
Many customer want W7 instead Vista Windows and we must converte all applications on this system


Hi, MdaSolution. Has you resolved this problem with txbrowse gradient rows bitmap painting?
If yes, can you describes it here? My version is 9.09
Thanks

Nao:
I saw your solution en this forum, but it not works in my version 9.09. Can you help me?
Thanks
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2110
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: TO NAGES Also Windows Seven Error Bitmap on Xbrowse

Postby MdaSolution » Mon Aug 02, 2010 5:28 pm

NO.
but if you want resolve somethig read this
viewtopic.php?f=6&t=18554&p=97245&hilit=DEFAULT#p97245
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: TO NAGES Also Windows Seven Error Bitmap on Xbrowse

Postby FranciscoA » Mon Aug 02, 2010 7:14 pm

Thanks Mdasolution
I've tried and it does not work in FWH 9.09
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2110
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: TO NAGES Also Windows Seven Error Bitmap on Xbrowse

Postby MdaSolution » Tue Aug 03, 2010 2:19 pm

Dear Francisco,
IT seems it is Important Topic...

Also in past....you must learn this :
"When it 'll be of public domain it can be resolved!"
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 110 guests