I recall that setwindowpic causes update problems.
Dont use it.
W.
-----Original Message-----
From: Robert Covington [mailto:artlythere@...]
Sent: Thursday, February 28, 2002 5:54 AM
To: futurebasic@...
Subject: Re: [FB] Plotting line over Window Pict
>I have set a PICT resource as a window background using the toolbox call:
>
>SetWindowPic( wndPtr, pictH )
>
>Does anyone know a technique for plotting a line over the pict? I
>can't seem to plot a line on top of the pict.
>
>Any hints?
>
>Thanks,
>
>Ken
I haven't ever used SetWindowPic.
For background picts, I usually use a purgeable pict resource...
Best to draw it in only on a refresh event (unless it is to be drawn some
time after the window is created for some reason.)
// doDialog, etc:
case _WndRefresh
DIM pictH as handle
pictH = FN GetPicture(_BgPictNumber) // your ID here
Long if pictH
Window Output MyWnd
DrawPicture(pictH)
// if marked purgeable, nothing further needed
End if
// draw some more stuff now
Plot 20,20 to 54,50 // etc
You can draw all over a puppy like this.
But otherwise, make sure your current port is set to be drawn to after
calling setWindowPic with a Window Output statement and see if that fixes
it.
Also, if your plotting is set to be done only on a refresh event, then
maybe the below gives a clue...seems it might not be getting that update
event.
rc
From Inside Mac, Window Manager B
SetWindowPic
Use the SetWindowPic procedure to establish a picture that the Window
Manager can draw in a window's content region.
DESCRIPTION
The SetWindowPic procedure stores in a window's window record a handle to a
picture to be drawn in the window. When the window's content region must be
updated,
the Window Manager then draws the picture or part of the picture, as
necessary, instead
of generating an update event.
--
To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>