TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Ivan Joergensen
from: Jonathan de Boyne Pollard
date: 1995-01-31 05:03:50
subject: Bye Bye, Bye Bye Baby! (

IJ>
  > What a creative change in subject name :-)
IJ>

  Don't you hate boring repetitious subject lines as well ?  (-:

IJ>
  >  JdeBP> The notes for WM_QUIT in the PM Reference in your toolkit will
  >  JdeBP> tell you the rest.
  >
  > No it doesn't. The documentation of WM_CLOSE, WM_SAVEAPPLICATION and
  > WM_QUIT is unusually vague.
IJ>

  It was fine for me.

IJ>
  > How to handle close or system shutdown "correctly": (pseudocode)
  >
  > WM_CLOSE:
  >   if 
  >     // prompt user, save application, then
  >     pass the wm_close to DefWindowProc
  >   else
  >     pass the wm_close to DefWindowProc
IJ>

  BZZZT!  You lose 50 points.  (-:

  Go back to the PM reference.  Look under "Default processing" for
  WM_CLOSE and think about what happens when your application has
  multiple windows.

IJ>
  > WM_QUIT:
  >   The application should call DestroyWindow for the window(s) it has
  >   created, and terminate.
IJ>

  Some applications place their "Do you want to save settings?" logic
  after their message loop has exited due to a WM_QUIT.

  You can actually differentiate between a WM_QUIT as sent by a system
  shutdown, and a WM_QUIT as sent by a WM_CLOSE by inspecting the window
  handle in the QMSG structure.   A system shutdown sets it to
  NULLHANDLE, whereas a WM_CLOSE (or a shutdown sent from the Window
  List), fills in an actual window handle.

  > JdeBP <
___
 X MegaMail 2.10 #0:
--- Maximus/2 2.02
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)
SEEN-BY: 12/2442 620/243 624/50 632/348 640/820 690/660 711/409 410 413 430
SEEN-BY: 711/807 808 809 934 942 949 955 712/515 713/888 800/1 7877/2809
@PATH: 440/4 141/209 270/101 396/1 3615/50 229/2 12/2442 711/409 808 809 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™.