[comp.sys.mac.programmer] Bug in GrowWindow?

ra_robert@gsbacd.uchicago.edu (06/14/89)

I was having some problems with GrowWindow a couple of days ago with LSP. 
Specifically, when I stretched the window as large as it would go, the horiz
and vert size of the new portRect (which is what is returned in the LONGINT by
GrowWindow) were consistently 1 pixel too small: i.e., if a coded in the max
horiz and max vert stretch sizes to be 500 and 300 repspectively, I would get
back the portRect size of my maximum-sized window as 499 horiz and 299 vert.

I thought maybe this is a problem with LS/THINK Pascal, so I had a Mac guru
friend of mine check it out with MPW.  Same thing.

The definition of GrowWindow says:
*****************************************************************************
The sizeRect parameter specifies limits, in pixels, on the vertical and
horizontal measurements of what will be the new portRect. SizeRect.top is the
minimum vertical measurement, sizeRect.left is the minimum horizontal
measurement, sizeRect.bottom is the maximum vertical measurement, and
sizeRect.right is the maximum horizontal measurement.

GrowWindow returns the actual size for the new portRect as outlined by the grow
image when the mouse button is released. The high-order word of the LongInt is
the vertical measurement in pixels and the low-order word is the horizontal
measurement.
*****************************************************************************


Are we missing something here?  Why is the portRect returned when the window is
stretched to the max one pixel smaller horiz and vertically than the GrowWindow
definition says it should be?
                                                        

 
Robert
------
ra_robert@gsbacd.uchicago.edu
------
generic disclaimer: all my opinions are mine