Ignore:
Timestamp:
Oct 20, 1999, 3:48:07 PM (26 years ago)
Author:
phaller
Message:

Fix: ExitWindowsEx with confirmation dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/user32.cpp

    r1348 r1377  
    1 /* $Id: user32.cpp,v 1.44 1999-10-18 10:54:04 sandervl Exp $ */
     1/* $Id: user32.cpp,v 1.45 1999-10-20 13:48:07 phaller Exp $ */
    22
    33/*
     
    770770/* Error Functions */
    771771
    772 BOOL WIN32API ExitWindowsEx( UINT uFlags, DWORD  dwReserved)
    773 {
    774 #ifdef DEBUG
    775     WriteLog("USER32:  ExitWindowsEx\n");
    776 #endif
    777     return O32_ExitWindowsEx(uFlags,dwReserved);
    778 }
     772/*****************************************************************************
     773 * Name      : ExitWindowsEx
     774 * Purpose   : Shutdown System
     775 * Parameters: UINT  uFlags
     776 *             DWORD dwReserved
     777 * Variables :
     778 * Result    : TRUE / FALSE
     779 * Remark    :
     780 * Status    :
     781 *
     782 * Author    : Patrick Haller [Tue, 1999/10/20 21:24]
     783 *****************************************************************************/
     784
     785ODINFUNCTION2(BOOL, ExitWindowsEx, UINT,  uFlags,
     786                                   DWORD, dwReserved)
     787{
     788  int rc = MessageBoxA(HWND_DESKTOP,
     789                       "Are you sure you want to shutdown the system?",
     790                       "Shutdown ...",
     791                       MB_YESNOCANCEL | MB_ICONQUESTION);
     792  switch (rc)
     793  {
     794    case IDCANCEL: return (FALSE);
     795    case IDYES:    break;
     796    case IDNO:
     797      dprintf(("no shutdown!\n"));
     798      return TRUE;
     799  }
     800
     801  return O32_ExitWindowsEx(uFlags,dwReserved);
     802}
     803
     804
    779805//******************************************************************************
    780806//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.