Harvey,
I had a look at the Dialog-Preview. It seems to be OK
The difference is only :
Horizontal
GradientFill( hDC, 0, 0, oWnd:nHeight, oWnd:nWidth, aGrad,
.T. )
Vertical
GradientFill( hDC, 0, 0, oWnd:nHeight, oWnd:nWidth, aGrad,
.F. )
I don't know the FWH-Version You are using.
I my Background-Tools, I included a Version-Check for the Gradient-Painting.
Using a Version < FWH 8.07, GradientFill must be changed.
- Code: Select all Expand view
IF DIRECTION = .T. // Horizontal
IF FWHVERS < 7.09
Degrade( hDC, oWnd )
ENDIF
IF FWHVERS >= 7.09 .and. FWHVERS < 8.07
Gradient( hDC, { 0, 0, oWnd:nHeight, oWnd:nWidth }, COLOR1, COLOR2, .T. )
ENDIF
IF FWHVERS >= 8.07
GradientFill( hDC, 0, 0, oWnd:nHeight, oWnd:nWidth, aGrad, .T. )
ENDIF
ELSE
IF FWHVERS < 7.09
Degrade( hDC, oWnd )
ENDIF
IF FWHVERS >= 7.09 .and. FWHVERS < 8.07
Gradient( hDC, { 0, 0, oWnd:nHeight, oWnd:nWidth }, COLOR1, COLOR2, .F. )
ENDIF
IF FWHVERS >= 8.07
GradientFill( hDC, 0, 0, oWnd:nHeight, oWnd:nWidth, aGrad, .F. )
ENDIF
ENDIF
// ------- NO Vertical !!! -----------------------------
STATIC FUNCTION Degrade( hDC, oWnd )
LOCAL nStep , nStepY
LOCAL oBrush
LOCAL i, r,g,b
LOCAL r0,g0,b0
LOCAL r1, g1, b1
LOCAL rD, gD, bD
LOCAL aRect := GETCLIENTRECT( oDlg:hWnd )
nStep := ( aRect[ 3 ] - aRect[ 1 ] )
nStepY := ( aRect[ 3 ] - aRect[ 1 ] ) / nStep
aRect[ 3 ] = aRect[ 1 ] + nStepY
r0 := nRGBRed (COLOR1)
g0 := nRGBGreen (COLOR1)
b0 := nRGBBlue (COLOR1)
r1 := nRGBRed (COLOR2)
g1 := nRGBGreen (COLOR2)
b1 := nRGBBlue (COLOR2)
rD := r1-r0
gD := g1-g0
bD := b1-b0
r := 256*rD/Max(nStep,1)
g := 256*gD/Max(nStep,1)
b := 256*bD/Max(nStep,1)
r0*=256
g0*=256
b0*=256
FOR i = 0 TO nStep-1 STEP nStepY
r0 += r
g0 += g
b0 += b
DEFINE BRUSH oBrush COLOR nRGB( r0/256, g0/256, b0/256 )
FILLRECT( hDC, aRect, oBrush:hBrush )
RELEASE BRUSH oBrush
aRect[ 1 ] += nStepY
aRect[ 3 ] += nStepY
NEXT
RETURN (nil)
Marcelo,
After a new FWH-Version, I'm doing changes in the different Tools.
There will be a Main-Module, from where it is possible to start the different Parts.
As long there are still changes in different Classes, I use seperate Tools,
because it is better to control, what to do.
Some nice Extensions for a new Update :
1. Complete Resizing of the Titles.
2. Control from the Background-Gradient
3. Now it is possible, to design the Title with real Size and Font,
in Relation to the Background-Gradient on the Main-Page.
New Settings :
Real Size-Preview :
Best Regards
Uwe