home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13207 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  1.1 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!purdue!mentor.cc.purdue.edu!brazil.psych.purdue.edu!neath
  2. From: neath@brazil.psych.purdue.edu (Ian Neath)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Summary: WindowPtrs, CWindowPtrs, and Think C:  Where are my colors?
  5. Summary: Beware the GrafPtr!
  6. Message-ID: <55555@mentor.cc.purdue.edu>
  7. Date: 30 Jul 92 16:23:59 GMT
  8. Sender: news@mentor.cc.purdue.edu
  9. Organization: Purdue University
  10. Lines: 18
  11.  
  12. Thanks to all who responded.  First, NewCWindow does return a WindowPtr.
  13. IM V is slightly incorrect in that it says a CWindowPtr is returned.
  14. This is true, but you call it a WindowPtr:  the system knows what it 
  15. really is.
  16.  
  17. Second, I had an alert appear between SetPort( myWindow ) and the
  18. RGBBackColor call.  This caused the system to think myWindow was
  19. a GrafPtr and not a CGrafPtr.  Rearranging GetPorts and SetPorts
  20. did the trick.
  21.  
  22. Thanks again.
  23.  
  24. - Ian
  25.  
  26. --
  27.     Ian Neath, PhD     | There are four kinds of people in this world:
  28. neath@psych.purdue.edu |    cretins, fools, morons, and lunatics.
  29.  neath@purcvvm.bitnet  |                       - Umberto Eco 
  30.