Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!andrew.cmu.edu!gb2a+ From: gb2a+@andrew.cmu.edu (George J. Baxter) Newsgroups: comp.sys.mac.programmer Subject: Probs with CopyBits and GWorlds Message-ID: Date: 18 Dec 90 16:13:52 GMT Organization: Carnegie Mellon, Pittsburgh, PA Lines: 42 Hey gang, I'm writing some code in MPW C and I need to do a copybits from a GWorld to a window, and I'm having some problems... the code works fine in THINK C, but MPW doesn't recognize the GWorld portPixMap as a PixMap. Type casting gives me the following error... srcMap = (PixMap *)((*fGWorld).portPixMap); destMap = (PixMap *)((*(GWorldPtr)myMNWindow).portPixMap); # CopyBits((PixMap)(*srcMap), # ? ### Error 199 type in (cast) must be scalar; ANSI 3.3.4; page 39, lines 10-11 (I know you don't care, I'm just trying to annoy you) # ? ### Error 198 operand of (cast) must be scalar # ? ### Error 229 mismatch between formal and actual parameter types #------------------------------------------------------------------------------ - ------------------------------------------------- # CopyBits((BitMap)(*srcMap), # (PixMap)(*destMap), &aRect, &(myMNWindow->portRect), 0 , 0L); # ? ### Error 199 type in (cast) must be scalar; ANSI 3.3.4; page 39, lines 10-11 (I know you don't care, I'm just trying to annoy you) # ? ### Error 198 operand of (cast) must be scalar # ? ### Error 229 mismatch between formal and actual parameter types srcMap and destMap are PixMap pointers.. if I don't typecast them, it throws me a mismatch between format and actual parameter types. Whadooidoo?? ----------------------- gb2a@andrew.cmu.edu baxter@a.cfr.cmu.edu baxter@imga.cfr.cmu.edu q100gb2a@vb.cc.cmu.edu "Only a Hawaiian can say Humuhumunukunukuapuaa five times fast, correctly."