A question about FWH-Release-Versions for function-use

A question about FWH-Release-Versions for function-use

Postby ukoenig » Mon Nov 10, 2008 1:01 pm

Hello,

In all my tool-application, i want to create different sources belongs to
the FWH-versions.
The user can add his FWH-version and the source will be written
belongs to his version.

Image

There is a lot of GRADIENT-painting.

Somebody knows the start-FWH-versions for these 3 functions ?
I had a look at the whatsnew.txt, but i am not really shure.

I don't know the release-version and if it is possible,
to include the source to use for old FWH-versions
------------------------------------------------------
StretchBlt( hDC, nLeft, nTop, nWidth, nHeight )

I think, this started with < September 2007 build > ( outlook 2003 )
---------------------------------------------------------------------------
aRect := GETCLIENTRECT( oDlg5:hWnd )

Gradient( hDC, { aRect[1], aRect[2], aRect[3], aRect[4] }, ;
COLOR1, COLOR2, .F. )

I think, this started with FWH 8.08 ( new Buttonbar 2007 )
------------------------------------------------------------------
GradientFill( hDC, 0, 0, oWnd:nHeight, oWnd:nWidth, aGrad, .T. )

Are these the correct FWH-versions to use the functions ?

To make it possible for FWH-users with older versions,
i would like to include a simple gradient-function to the source :
I save a small dialog as BMP and use => StretchBlt

Regards
Uwe :lol:
Last edited by ukoenig on Tue Nov 11, 2008 11:07 am, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby StefanHaupt » Tue Nov 11, 2008 8:46 am

Uwe,

for all who don´t have the gradient function in their fwh release, here is a replacement (only vertical gradients)

Code: Select all  Expand view
//-----------------------------------------------------------------//
STATIC FUNCTION Degrade ( hDC, aRect, nColor, nColorTo )

  LOCAL nStep , nStepY
  LOCAL oBrush
  LOCAL i, r,g,b
  LOCAL r0,g0,b0
  LOCAL r1, g1, b1
  LOCAL rD, gD, bD

  DEFAULT nColorTo := nRGB (250,250,250)

    //nColor := nRGB (255,0,0)

    nStep  := ( aRect[ 3 ] - aRect[ 1 ] )
    nStepY := ( aRect[ 3 ] - aRect[ 1 ] ) / nStep
    aRect[ 3 ] = aRect[ 1 ] + nStepY

    r0 := nRGBRed (nColor)
    g0 := nRGBGreen (nColor)
    b0 := nRGBBlue (nColor)
    r1 := nRGBRed (nColorTo)
    g1 := nRGBGreen (nColorTo)
    b1 := nRGBBlue (nColorTo)
    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)
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

FW-Release

Postby ukoenig » Tue Nov 11, 2008 10:07 am

Hello Stefan,

thank you for the function.
I still need the start-date of the two grad-functions.
( maybe Antonio knows the start, it is possible to use them )

What i want to do is :

sample : FW-release September / 2007
would be :
Code: Select all  Expand view

IF nFWFUNC < 7.9  // year.month
   Degrade ( hDC, aRect, nColor, nColorTo )
ELSE
   GRAD_PAINT()
ENDIF



Maybe another way to do it :
Saving the window- and dialog-background as a small BMP
and using it as a Brush.
FWH-users with older versions, will have the same settings. ?

Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby jose_murugosa » Tue Nov 11, 2008 10:28 am

Uwe

just a litle contribution....

Gradientfill() was included first time in July 2008 version of fivewin I meen FWH 8.07
Saludos/Regards,
José Murugosa
"Los errores en programación, siempre están entre la silla y el teclado y la IA!!"
User avatar
jose_murugosa
 
Posts: 1180
Joined: Mon Feb 06, 2006 4:28 pm
Location: Uruguay

Postby StefanHaupt » Wed Nov 12, 2008 8:21 am

Hi Uwe,

the gradient function starts with Fwh 7.09
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Versions

Postby ukoenig » Wed Nov 12, 2008 10:18 am

Hello,

Thank you very much for the information.

It means, I have to create 3 different sources
to compile a running EXE-file :

Version < 7.09
No office-bar and extra Gradient-function
-----------------------------------------------
Version >= 7.09 and < 8.07
Office-bar with GRADIENT - function
-----------------------------------------------
Version >= 8.07
Office-bar with GRADIENTFILL - function
-----------------------------------------------
That will make it possible, that the user can compile
a running EXE-file for any FWH-versions without
error-message, because of missing functions.

I will add these extra functions this weekend.
Also there will be a new IMAGE-Viewer for fivewin i'm working on.
As a Graphic-editor, I do a connection to GIMP2 ( freeware )
There will be still a Image-resize and more.

A screenshot of the first result :

Image

Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 66 guests