home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 20.ddi / APPLAUNC.PAK / EXITWIN.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  750 b   |  23 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1991, 1993 by Borland International
  3. //
  4. // ExitWin will exit Windows.  If "prompt" is given on the command-line then
  5. // the user will be prompted to confirm the exit.
  6. //
  7. //----------------------------------------------------------------------------
  8. #include <owl\owlpch.h>
  9. #include <string.h>
  10. #include <windows.h>
  11.  
  12. #if defined(__SMALL__) || defined(__MEDIUM__)
  13.   #define strstr _fstrstr
  14. #endif
  15.  
  16. int PASCAL WinMain(HINSTANCE, HINSTANCE, LPSTR clpLine, int)
  17. {
  18.   if (strstr(clpLine, "prompt") != 0)
  19.     if (MessageBox(0, "Confirm!", "Exit Windows", MB_OKCANCEL) == IDCANCEL)
  20.       return 0;
  21.   return ExitWindows(0,0);
  22. }
  23.