| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | OS/2 Shutdown |
PB>
> Does anyone know of a way for a program to capture the fact
> that a SHUTDOWN has been initiated?
PB>
To determine the specific cause of a shutdown, inspect the parameters of
the WM_QUIT message that terminates your message loop.
WM_QUIT resulting from WinShutdownSystem : hwnd = 0
WM_QUIT resulting from Window List close : hwnd != 0, mp1 = hwnd
WM_QUIT resulting from WM_CLOSE message : hwnd != 0, mp1 = 0
In other words, WinShutdownSystem sends a WM_QUIT to the message queue,
whereas the default processing of WM_CLOSE in WinDefWindowProc and the
close option on the Window List both send a WM_QUIT to a specific
window.
If you want to save state before a shutdown, then do that in response to
the WM_SAVEAPPLICATION message, which is sent before the WM_QUIT
message.
> JdeBP <
___
X MegaMail 2.10 #0:
--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)SEEN-BY: 50/99 54/99 270/101 620/243 625/0 160 640/201 711/401 409 410 413 SEEN-BY: 711/430 808 809 934 955 712/311 407 505 506 517 623 624 704 841 SEEN-BY: 713/317 800/1 @PATH: 440/4 141/209 270/101 712/624 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.