Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!govt.shearson.COM!fgreco From: fgreco@govt.shearson.COM (Frank Greco) Newsgroups: comp.windows.x Subject: Re: How to get Canvas from Xv_Window in XView? Message-ID: <9008172003.AA21645@islanders.> Date: 17 Aug 90 20:03:44 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 26 Tony, >Using the XView toolkit, how can I obtain the Canvas from >within the event_proc(); > >I have a procedure to handle events into a canvas. This >procedure services 4 Canvases used in my application. >The event_proc() parameter are defined as: > >void event_proc( window, event) > Xv_Window window; > Event *event; > > How do I get the Canvas from the Xv_Window data structure? > Is their a way? The first argument in the event_proc for a Canvas is the canvas that belongs to the event_proc, and its value is the canvas in which the event took place. In other words, given your example, the value of "window" is the value of the canvas in which the event took place. Frank G.