Message-ID: <38A566AB.8ED6BCDF@maths.unine.ch> Date: Sat, 12 Feb 2000 13:56:59 +0000 From: Gautier X-Mailer: Mozilla 4.7 (Macintosh; I; PPC) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Untrapping Ctrl-C in DJGPP References: <01bf725f$15b1d9e0$12e126d4 AT pena-ii> <01bf7348$40dc9260$69e126d4 AT pena-ii> <38A472E7 DOT 2E9862E1 AT is DOT elta DOT co DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: mac13-32.unine.ch X-Trace: 12 Feb 2000 13:55:38 +0100, mac13-32.unine.ch Lines: 26 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > So how does edit.com catch it? > (open dos box) > edit foo.c > (type some garbage) > (click close box) > Save changes to foo.c? Edit or Command *actively* check for close requests in their main event loop using the interrupt I've mentioned. No signal received! Here a small Pascal excerpt for an idle event loop (in EDIT.EXE): if W95 then begin if W95Close.Command(query) = close_selected then begin W95Close.Command(acknowledge); W95_closetime:= systime; e.What:= evCommand; e.command:= cmQuit; putevent(e) end; if W95Close.status = close_acknowledged then if abs(W95_closetime-systime) > 180 then W95Close.Command(cancel); end; -- Gautier _____\\________________\_______\ http://members.xoom.com/gdemont/