[comp.sys.mac.programmer] Question: InvalRect in Think C

reiss@husc9.harvard.edu (Peter Reiss) (03/14/91)

I am writing a program using Think C version 4.0.2 on an SE/30.
At several points I need to add a rectangle to the update region of a 
dialog box.  The calls InvalRect and InvalRgn, however, fail to work.  Each
one generates an out-of-memory error.  What am I doing wrong/not doing?

Please respond via e-mail to  reiss@husc9.harvard.edu

dorner@pequod.cso.uiuc.edu (Steve Dorner) (03/14/91)

>At several points I need to add a rectangle to the update region of a 
>dialog box.  The calls InvalRect and InvalRgn, however, fail to work.  Each
>one generates an out-of-memory error.  What am I doing wrong/not doing?

Make sure that you have set the current port to your dialog window.
Make sure you are giving InvalRect a pointer to the rectangle, and not
the rectangle itself.
Make sure you are passing a VALID region to InvalRgn.
--
Steve Dorner, U of Illinois Computing Services Office
Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner