Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!uw-june!roper From: roper@june.cs.washington.edu (Michael Roper) Newsgroups: comp.windows.ms Subject: Re: Closing Down MS_DOS Executive Message-ID: <7995@june.cs.washington.edu> Date: 25 Apr 89 21:11:07 GMT References: <2012@lznh.UUCP> Distribution: na Organization: U of Washington, Computer Science, Seattle Lines: 20 Lisa Krauth writes: > I got this solution from Microsoft Tech Support: > > PostMessage((HWND)0xffff, WM_SYSCOMMAND, SC_CLOSE, (LONG)0); > > Apparently the specified window handle, (0xffff), will close all windows > that are currently running. Or more precisely, using 0xffff as a window handle in either a PostMessage() or SendMessage() call will cause the message to be sent to all top-level windows in the system -- including the MS-DOS Executive. Unfortunately, this does not solve the original problem, which was how to exit windows without confronting the confirmation message box that the Executive puts up. Sending the Executive the message suggested is exactly equivalent to selecting "Close" from the Executive's control menu. Michael Roper hDC Computer Corporation