[comp.sys.mac.programmer] Think C 4.0 / Color Quickdraw problem

dway@us.cc.umich.edu (Doug Way) (07/16/90)

     Has anyone out there programmed Color Quickdraw stuff with Think C?
I've been having a problem with getting the compiler to recognize that
color routines such as RGBForeColor and SetCPixel are passed the data type
RGBColor.  For some reason it thinks that it should be a long integer, as
with the (old Quickdraw) ForeColor routine.  Inside Mac vol. 5 states
that these new routines use RGBColor, which contains red, green and blue
values ($0000 to $FFFF).  When I try to compile, though, it gives me the
"Pascal argument wrong size" error.  It compiles fine with a long integer
passed, and runs as if it were using the old Quickdraw routine.
     I've included Color.h and all that, and it recognizes RGBForeColor and
SetCPixel (no linking problems) as valid routines...  What's the deal?
Are the declarations messed up in MacTraps, or am I missing something
obvious?
     Answers of general interest can be posted to the net, otherwise send
me email.

Thanks,  -Doug Way

oster@well.sf.ca.us (David Phillip Oster) (07/18/90)

RGBForeColor takes a pointer to an RGB. You should be using the MacProtos5.h
file that I periodically post in this group. It gives prototypes for IM V5,
so that the compiler will warn you about problems like this one, and you
can search it so you can see for yourself. (A poor man's condensed IM 5.)
-- 
-- David Phillip Oster - Note new address. Old one has gone Bye Bye.
-- oster@well.sf.ca.us = {backbone}!well!oster