Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!sics.se!fuug!news.funet.fi!hydra!klaava!cc.helsinki.fi!tyrvainen From: tyrvainen@cc.helsinki.fi Newsgroups: comp.lang.pascal Subject: Graphics with TVision Message-ID: <1991May29.235249.1@cc.helsinki.fi> Date: 29 May 91 21:52:49 GMT Sender: news@klaava.Helsinki.FI (Uutis Ankka) Organization: University of Helsinki Lines: 53 Hi ! I wonder if anybody has solved this problem before. The problem is, how to refresh the screen after closing graphics when using Turbo Vision. Initializing graphics is not a probleb. After closing graphics the screen should return to the state it was before entering graphics mode. So, all views owned by TApplication object should draw themselves with their own methods. I tried to send a broadcast to the TApplication object with message function, but it doesn't get there ! Here is some code WITHOUT ANY DETAILS: PROGRAM MyProgram; USES MyUnit; ... PROCEDURE TMyApp.HandleEvent ... CASE Event.What OF ... evBroadCast: IF Event.Command=cmGraphClosed THEN Draw; ... END; UNIT MyUnit; INTERFACE CONST cmGraphClose = 155; IMPLEMENTATION PROCEDURE MyObj.ThisProcedure; InitGraph... ... CloseGraph; p:= Message(Owner, evBroadCast, cmGraphClosed, @Self); END; This isn't very clear, but the idea is that the application owns a dialog box which contains MyObj. The Message should be routed to the dialog box and after that to the desktop and so on. But nobody seems to handle it, pointer p gets value NIL ! I'm sure there is some better solution for this. Maybe You can advice me ! Tyrvainen@cc.Helsinki.Fi Teppo Tyrv{inen University of Helsinki