home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / caspm210.zip / QUIKTOUR / EXIT.INC < prev    next >
Text File  |  1990-08-07  |  1KB  |  36 lines

  1. /***************************************************************************/
  2. /* This is a sample .INC file that can be tied to an Exit menu pulldown to */
  3. /* exit a PM application.  This code fragment will present a PM Message Box*/
  4. /* that asks the user to confirm his/her request to exit the application.  */
  5. /* If the Yes push button is pressed, the application is exited.  If the   */
  6. /* No pushbutton is pressed, the user is returned to the applicaiton.      */
  7. /***************************************************************************/
  8.  
  9.  
  10.                        {
  11.                        USHORT answer;
  12.                        answer = WinMessageBox (HWND_DESKTOP, 
  13.                            hWnd,
  14.                            "Are you sure you wish to exit this application?",
  15.                            "Exit",
  16.                            NULL,
  17.                            MB_YESNO | MB_ICONHAND);
  18.                        switch(answer)
  19.                      {
  20.                 case MBID_YES:
  21.                                 WinPostMsg(hWnd, WM_QUIT, 0L, 0L);
  22.                                   break;
  23.           
  24.                             case MBID_NO:
  25.                                   break;
  26.             
  27.                            default:
  28.                                  break;
  29.                             }
  30.                        }
  31.  
  32.  
  33. /**************************************************************************/
  34. /* End of ASCII include file EXIT.INC                      */
  35. /**************************************************************************/
  36.