Info about if Window width or height is resized ?

Info about if Window width or height is resized ?

Postby ukoenig » Tue May 07, 2019 9:55 am

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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

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

Postby nageswaragunupudi » Wed May 08, 2019 2:04 am

Image

Code: Select all  Expand view
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
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

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

Postby ukoenig » Mon May 13, 2019 3:28 pm

Mr. Rao,

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

viewtopic.php?f=3&t=37133&p=221876#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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

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

Postby nageswaragunupudi » Mon May 13, 2019 4:07 pm

Multiple Images:
Code: Select all  Expand view
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
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Silvio.Falconi and 101 guests