[comp.sys.mac.programmer] LSP GrowWindow Problem

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

I've been having a problem with GrowWindow in THINK/LS Pascal.  I'm probably
just missing something, and will be properly embarrassed when it's pointed out
to me. :->

I write some code like this (normally I don't hard code in the max numbers, but
I did it just to be sure):


  SetRect(stretchLimitz, minWidth, minHeight, 560, 400);

  theDimensions := GrowWindow(theGrowWindow, startPoint, stretchLimitz);
  if theDimensions <> 0 then 
	{all the rest of the window stuff}

So the window's portRect should be allowed to grow to a max height of 400, and
a max width of 560, right?  OK, then I drag the window to as big as it will go
(I did it several times just to make sure I was dragging it to max size: I hold
the mouse down until it's about 20 pixels to the right and bottom of grow box
and then let go).

This is what I get, though: theDimensions comes back being $018F 022F, and thus
HiWord(theDimensions) is 399 and LoWord(theDiwhen the mensions) is 559.  This
consistently happens: my portRect dimensions when I grow the window to max size
are always one less than the max amounts I pass to GrowWindow.  Any clues?

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