Info about if Window width or height is resized ?

Post Reply
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Info about if Window width or height is resized ?

Post by ukoenig »

Hello,

somebody asked for a solution to zoom / unzoom objects
inside a panel on window resize.

I got it working ( some calculations are needed )
To make it shorter is there a information if windows
height or width is resized ?
For the moment I check the window-sizes ( width and height )
against each other after a resize to calculate the needed object resize / zoom-factor.

The image shows the result after the window hight is resized.

Image

regards
Uwe :?:
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
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Info about if Window width or height is resized ?

Post by nageswaragunupudi »

Image

Code: Select all

func test()

   local oWnd, aBmp

   DEFINE WINDOW oWnd

   aBmp  := oWnd:ReadImage( "c:\fwh\bitmaps\pngs\2.png" )
   oWnd:bPainted := { || oWnd:DrawImage( aBmp, { 0.1, 0.05, 0.5, 0.45 } ) }

   ACTIVATE WINDOW oWnd CENTERED

   PalBmpFree( aBmp )

return nil
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Info about if Window width or height is resized ?

Post by ukoenig »

Mr. Rao,

the solution I've been looking for to resize multiple images on window-resize

http://forums.fivetechsupport.com/viewt ... 76#p221876

regards
Uwe :D
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
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Info about if Window width or height is resized ?

Post by nageswaragunupudi »

Multiple Images:

Code: Select all

function TempTest()

   local oWnd, aOlga, aSea

   DEFINE WINDOW oWnd

   aOlga := oWnd:ReadImage( "c:\fwh\bitmaps\olga1.jpg" )
   aSea  := oWnd:ReadImage( "c:\fwh\bitmaps\sea.bmp" )

   oWnd:bPainted  := <|hDC|
      oWnd:DrawImage( aOlga, { 0.05, 0.10, 0.50, 0.45 } )
      oWnd:DrawImage( aOlga, { 0.05, 0.55, 0.50, 0.90 } )
      oWnd:DrawImage( aSea,  { 0.50, 0.16, 0.99, 0.83 } )
      return nil
      >

   ACTIVATE WINDOW oWnd CENTERED

   PalBmpFree( aOlga )
   PalBmpFree( aSea )

return nil
 
Regards

G. N. Rao.
Hyderabad, India
Post Reply