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: Re: Problem: getting strucRgn/contRgn of invisible windows Message-ID: <1656@tcs.tcs.com> Date: 29 Jan 91 18:33:18 GMT Sender: root@tcs.com Organization: Teknekron Communications Systems Lines: 21 References:<48582@apple.Apple.COM> <3856@uakari.primate.wisc.edu> In article <3856@uakari.primate.wisc.edu> bin@primate.wisc.edu (Brain in Neutral) writes: > | MacApp does this by saving off the contents of those fields, calling > | the WDEF directly with the wCalcRgns message, looking at the results, > | and then restoring the old contents of the fields. > > Anyone have code to do this? (Yes, I feel stupid asking this, since > the WDEF function definition is in IM, but I had already tried this > and couldn't get it to work. THINK C preferred, but anythink accepted > gratefully.) Hmm... If I remember right, to call an existing WDEF function, do something like this: WindowPeek wnd; int varCode = L; long param = 0L; int message = wCalcRgns; ret = CallPascalL(varCode, wnd, message, param,wnd->windowDefProc); That should update theWindow->strucRgn & theWindow->contRgn fields.