home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / d / d014 / 2.ddi / QUIKTOUR / EXIT.INC < prev    next >
Encoding:
Text File  |  1990-09-27  |  1.2 KB  |  32 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.       int answer;
  11.       answer = MessageBox(hWnd,
  12.                          "Are you sure you wish to exit this application?",
  13.                          "Exit",
  14.                           MB_YESNO | MB_ICONHAND);
  15.       switch (answer)
  16.         {
  17.          case IDYES:
  18.               PostMessage(hWnd, WM_QUIT, 0, 0L);
  19.               break;
  20.  
  21.          case IDNO:
  22.               break;
  23.  
  24.          default:
  25.               break;
  26.         }
  27.      }
  28.  
  29. /**************************************************************************/
  30. /* End of ASCII include file EXIT.INC                      */
  31. /**************************************************************************/
  32.