Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!tcs!tcs.com!pbuck From: pbuck@tcs.com (Peter Buckner) Newsgroups: comp.sys.mac.programmer Subject: Patterns in WDEF ? Message-ID: <1657@tcs.tcs.com> Date: 29 Jan 91 18:49:22 GMT Sender: root@tcs.com Organization: Teknekron Communications Systems Lines: 15 In response to the wDraw message inside a customer WDEF, I'd like to use a pattern to paint the window frame. However, I cannot seem to get the pattern recognized & used. Basically, the code looks like this (with some simplification): case wDraw: if(theWindow->hilited && theWindow->visible){ PenPat(gray); PenSize(5,5); FrameRgn(theWindow->strucRgn); } break; The change to PenSize seems to work great in that if I do not call PenPat, I get a black, 5-pixel box around the frame. If I call PenPat, I get garbage pattern, 5-pixels around the frame. Use my own Pattern, you say? Did that, same result. I have also tried FillRgn(rgn, myPat) since it will ignore the current PenState. Failed also. Note I can draw in the frame perfectly well, using LineTo, etc. Only the patterns get garbaged.