home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 12761 < prev    next >
Encoding:
Text File  |  1992-07-21  |  1.6 KB  |  33 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!mips!sdd.hp.com!caen!hellgate.utah.edu!fcom.cc.utah.edu!u.cc.utah.edu!tomj
  3. From: tomj@u.cc.utah.edu (Johnson)
  4. Subject: Re: Urgent Help Needed
  5. Message-ID: <1992Jul21.153009.18893@fcom.cc.utah.edu>
  6. Summary: Send the ADDRESS of the Rect
  7. Sender: tomj@iomega.com
  8. Organization: University of Utah Computer Center
  9. References: <1992Jul20.174636.6934@cerritos.edu> <9q@byu.edu>
  10. Date: Tue, 21 Jul 92 15:30:09 GMT
  11. Lines: 20
  12.  
  13. In article <9q@byu.edu> gaow@bones.et.byu.edu (Jinsong Gao) writes:
  14. >Hi, I'd like to thank all who helped me for my previous questions. Now
  15. >I have another puzzle that I can't solve.  It seems simple, but I am
  16. >desperately stuck.  I use a few QuickDraw routines for manipulating Rects.
  17. >The problem is that non of them work.  I always get a "pascal argument 
  18. >wrong size" error message.  Inside Macintosh Vol.I lists these routines as
  19. >taking a Rect.  But no matter where my Rects come from (define a Rect, or
  20. >a windowptr->portRect), Iget this error.  Is there any change to these 
  21. >routines?  If not, what do I have to do to use these routines (such as
  22. >SetRect, EraseRect, FrameRect, and OvalRect).
  23. >
  24. You must remember that in PASCAL (the language used to describe the
  25. interfaces in IM), any structure of over 4-bytes is automatically sent
  26. as a pointer to enhance speed.  Thus, when IM says "ClipRect(r: Rect)",
  27. in Pascal, what it means to a C programmer is: "void ClipRect(Rect *r)",
  28. and would be called as: ClipRect(&myRect).
  29.  
  30. Good Luck on meeting your deadline.
  31.  
  32. Tom Johnson    (tomj@iomega.com)
  33.