[comp.sys.mac.programmer] Clipboard Problem

hennen@stable.ecn.purdue.edu (Joe F Hennen) (06/21/91)

This is my first posting to this newsgroup. I am just getting started
with the toolbox and THINK C. I am writing a small program that draws
a polygon ( a triangle) and then saves it to the clipboard.
The polygon is drawn fine and it appears to save it to the clipboard.
After exiting the program and returning to the finder, I try to check the
clipboard. The top line of the window says " Clipboard contents: Picture.
The problem is my polygon is a polyGONE (it's missing)!
Any clues for a greenhorn?
Thanks in advance.
-tom davey

mxmora@unix.SRI.COM (Matt Mora) (06/22/91)

In one word;

cliprect


-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________

mxmora@unix.SRI.COM (Matt Mora) (06/22/91)

You didn't read the "Programmers One-liners" section of the Usenet
Macintosh Programmers Guide before you posted this question did you? :-)

I think you are being bit by the Cliprect bug. You need to set the 
cliprect to the rect of your window (or some other reasonable value).

Thats my first guess.


Matt

-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________