The standard trick is to touch the Graphics object by calling of one
its drawing methods to get REALbasic to set the graphics port.
SetPort and REAL basic do not play well together. MacWindowPtr
returns a WindowPtr; you have to pass something else to SetPort. I
recall that there is a Window Manager function that takes a WindowPtr
and returns a CGrafPtr or whatever you would pass to SetPort.
Charles Yeomans
On Apr 27, 2006, at 3:00 PM, Peter K. Stys wrote:
I have some QD calls that draw stuff. Problem is, often the drawing
occurs at the right coordinates, but in the wrong window. So I guess
I need to set the grafport of a particular window.
Do I use SetPort? If so, what do I pass?
SetPort self.macWindowPtr causes a crash so that's not it.
Any ideas?
Incidentally, this wasn't an issue with earlier versions of RB, but
since 2K5 and 2K6, activating a window does not reset the grafport
accordingly.
Thanks,
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|