Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Window Manager Problem... Message-ID: <7644@hoptoad.uucp> Date: 15 Jun 89 05:24:35 GMT References: <14618@pasteur.Berkeley.EDU> <2375@internal.Apple.COM> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Distribution: na Organization: Eclectic Software, San Francisco Lines: 25 In article <2375@internal.Apple.COM> lsr@Apple.COM (Larry Rosenstein) writes: >The picture field is in the Window Manager portion of the data. WindowPtr >is declared as being the same as a grafPort, so if LSC is using this >definition as the basis of what to show, then you won't see any change. Clever! I was wondering what problem he was having -- I have used SetWindowPic and it works. However, note that after calling it on a window that's already visible, he will need to do an "InvalRect(&window->portRect);" to get the window redrawn. >If you cast the WindowPtr to a WindowPeek, then you should see the change. > (I haven't used LSC, but in LSP 2.0, there is a debugging tool to cast a >value to a different type.) The LSC debugger lets you display the value of any expression with no side effects, so the proper structure can be viewed simply by typing in the type cast -- i.e., "((WindowPeek)window)->windowPic". -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com Postal: 424 Tehama, SF CA 94103; Phone: (415) 495-2934 "What's bad? What's the use of turning? In Hell I'll be there a-burning! Meanwhile, think of what I'm earning! All on account of my name." - Bill Sykes, "Oliver"