home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / hypercar / 4097 < prev    next >
Encoding:
Text File  |  1992-11-06  |  1.5 KB  |  56 lines

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!cs.utexas.edu!bcm!lib!mdarpi1.mda.uth.tmc.edu!draper
  2. From: draper@odin.mda.uth.tmc.edu (E.J. Draper)
  3. Newsgroups: comp.sys.mac.hypercard
  4. Subject: Re: external window probs
  5. Message-ID: <7729@lib.tmc.edu>
  6. Date: 5 Nov 1992 18:27:00 GMT
  7. References: <cey3rKG00iV0M5y18i@andrew.cmu.edu>
  8. Sender: usenet@lib.tmc.edu
  9. Organization: U.T.M.D. Anderson Cancer Center
  10. Lines: 40
  11. Nntp-Posting-Host: mdarpi1.mda.uth.tmc.edu
  12. X-UserAgent: Nuntius v1.1.1d12
  13. X-XXMessage-ID: <A71EC4933F01019A@mdarpi1.mda.uth.tmc.edu>
  14. X-XXDate: Thu, 5 Nov 92 18:31:15 GMT
  15.  
  16. In article <cey3rKG00iV0M5y18i@andrew.cmu.edu> George J. Baxter,
  17. gb2a+@andrew.cmu.edu writes:
  18.  
  19. >   test = &((XWEventInfoPtr)(paramPtr->params[1]))->event;
  20.  
  21. Here's a little code that I think will help out...
  22.  
  23. pascal void main(XCmdPtr paramPtr)
  24. {
  25.     if (paramPtr->paramCount == -1)
  26.         DoEvent(paramPtr);
  27.     else
  28.         DoSetup(paramPtr);            
  29. }
  30.  
  31. void DoEvent(XCmdPtr paramPtr)
  32. {
  33.     GrafPtr            savePort;
  34.     EventRecord        myEvent;
  35.     WindowPtr        myWindow;
  36.     XWEventInfoPtr    myXWEventInfoPtr;
  37.     
  38.     myXWEventInfoPtr = (XWEventInfoPtr) (paramPtr->params[0]);
  39.     myWindow = myXWEventInfoPtr->eventWindow;
  40.     myEvent = myXWEventInfoPtr->event;
  41.  
  42.     GetPort(&savePort);
  43.     SetPort(myWindow);
  44.     ProcessEvent(paramPtr, myXWEventInfoPtr, myWindow, &myEvent);
  45.     SetPort(savePort);
  46. }
  47.  
  48.  
  49. Does this help?
  50.  
  51.  
  52.       |E|J-  ED DRAPER
  53.  rEpar|D|<-  Radiologic/Pathologic Institute
  54.              The University of Texas M.D. Anderson Cancer Center
  55.              draper@odin.mda.uth.tmc.edu
  56.