Antonio,
Just linked in my previous version of wbrowse.prg (7.12) and it works fine - i have done a file compare between the two files and i think the problem is in the function wBrwLine
If i comment the nRowpos line as detailed below, this fixes the problem
static function wBrwLine( hWnd, hDC, nRowPos, aValues, aColSizes,;
nColPos, nClrText, nClrPane,;
hFont, lTree, aJustify, nPressed, nLineStyle,;
nColAct, lFocused, oVScroll, bLogicLen, nClrTxt, nClrBack )
local nTxtHeight, hOldFont
local nColStart := -1
local nWidth := WndWidth( hWnd ) - If( oVScroll != nil .and. ;
Eval( bLogicLen ) > 1,;
GetSysMetrics( SM_CYHSCROLL ) + 3, 0 )
local nRow := nRowPos, nTop, nBottom, nLeft, nRight, n
local lReleaseDC := .f.
local hPen, hOld, hBrush
DEFAULT lTree := .f.
if Empty( hDC )
hDC = GetDC( hWnd )
lReleaseDC = .t.
endif
hOldFont = SelectObject( hDC, hFont )
nTxtHeight = GetTextHeight( hWnd, hDC ) + 1
nTop = nTxtHeight * nRow
nBottom = nTop + nTxtHeight - 1
SetTextColor( hDC, If( ValType( nClrText ) == "B",;
nClrText := Eval( nClrText ), nClrText ) )
//if nRowPos == 0
SetBkColor( hDC, If( ValType( nClrPane ) == "B",;
nClrPane := Eval( nClrPane ), nClrPane ) )
//endif
However there is one more difference between the two versions:
if ValType( aValues[ n ] ) == "N"
hBrush = CreateSolidBrush( If( nColAct != nil, nClrBack, GetBkColor( hDC ) ) )
hOld = SelectObject( hDC, hBrush )
FillRect( hDC, { nTop, nLeft, nBottom, nRight + If( ( nLineStyle == ;
LINES_NONE .or. nLineStyle == LINES_H_GRAY .or. nLineStyle == ;
LINES_H_BLACK ) .and. nRowPos != 0, 2, 0 ) }, hBrush )
DrawMasked( hDC, aValues[ n ], nTop, nLeft + 0 )
SelectObject( hDC, hOld )
DeleteObject( hBrush )
else
if nColAct != nil .and. n == nColAct
SetTextColor( hDC, nClrText )
SetBkColor( hDC, nClrPane )
else
if nRowPos != 0
SetTextColor( hDC, If( nColAct != nil, If( ValType( nClrTxt ) == "B",;
Eval( nClrTxt, n ), nClrTxt ),;
If( ValType( nClrText ) == "B", Eval( nClrText, n ), nClrText ) ) ) <-----This is new in 8.12 over 7.12
SetBkColor( hDC, If( nColAct != nil, If( ValType( nClrBack ) == "B",;
Eval( nClrBack, n ), nClrBack ),;
If( ValType( nClrPane ) == "B", Eval( nClrPane, n ), nClrPane ) ) ) <-----This is new in 8.12 over 7.12
endif
endif
if ! lTree
if nRowPos == 0 .and. ( IsAppThemed() .and. IsThemeActive() ) <--- The .and. isthemeactive() is new in 8.12 over 7.12
DrawHeader( hWnd, hDC, nTop - 1, nLeft, nBottom, nRight, AnsiToOem( aValues[ n ] ) )
else
if aJustify != nil .and. aJustify[ n ]
SetTextAlign( hDC, TA_RIGHT )
ExtTextOut( hDC, nTop, nRight - 2,;
{ nTop, nLeft, nBottom, nRight + If( (nLineStyle == ;
LINES_NONE .or. nLineStyle == LINES_H_GRAY .or. ;
nLineStyle == LINES_H_BLACK ) .and. nRowPos != 0, 2, 0 ) },; //socs + If((nLineStyle == LINES_NONE .OR. nLineStyle == LINES_H_GRAY .OR. nLineStyle == LINES_H_BLACK) .AND. nRowPos#0 ,2,0),;
cValToChar( aValues[ n ] ) )
else
SetTextAlign( hDC, TA_LEFT )
ExtTextOut( hDC, nTop, nLeft + 2,;
{ nTop, nLeft, nBottom, nRight + If( ( nLineStyle == ;
LINES_NONE .or. nLineStyle == LINES_H_GRAY .or. ;
nLineStyle == LINES_H_BLACK ) .and. nRowPos != 0, 2, 0 ) },;
cValToChar( aValues[ n ] ) )
endif
endif
else
DrawText( hDC, cValToChar( aValues[ n ] ),;
{ nTop, nLeft + 4, nBottom, nRight } )
endif
endif
My knowledge of modifying this code is limited so what harm would it be to comment out the first line or does it need modifying?