mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 11:02:16 +00:00
* Create a branch for USB experiments.
svn path=/branches/usb-experiments/; revision=72629
This commit is contained in:
parent
28d8ba0d3e
commit
0ee830d7a4
23049 changed files with 0 additions and 1313991 deletions
70
base/applications/shutdown/gui.c
Normal file
70
base/applications/shutdown/gui.c
Normal file
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS shutdown/logoff utility
|
||||
* FILE: base/applications/shutdown/gui.c
|
||||
* PURPOSE: Shows a GUI used for managing multiple remote shutdown/restarts
|
||||
* PROGRAMMERS: Lee Schroeder
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
BOOL CALLBACK ShutdownGuiProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
|
||||
{
|
||||
switch(msg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch(LOWORD(wparam))
|
||||
{
|
||||
case IDC_OK:
|
||||
EndDialog(hwnd, IDC_OK);
|
||||
break;
|
||||
case IDC_CANCEL:
|
||||
EndDialog(hwnd, IDC_CANCEL);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_CLOSE:
|
||||
EndDialog(hwnd, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* NOTE: Until the ability to shutdown computers remotely, the GUI feature
|
||||
* can't be fully implemented.
|
||||
*/
|
||||
BOOL ShutdownGuiMain(struct CommandLineOptions opts)
|
||||
{
|
||||
INT_PTR result = DialogBoxW(GetModuleHandle(NULL),
|
||||
MAKEINTRESOURCEW(IDD_GUI),
|
||||
NULL,
|
||||
ShutdownGuiProc);
|
||||
|
||||
switch (result)
|
||||
{
|
||||
case IDC_OK:
|
||||
MessageBoxW(NULL, L"This function is unimplemented.", L"Unimplemented", MB_OK);
|
||||
break;
|
||||
|
||||
case IDC_CANCEL:
|
||||
/* Exits the program */
|
||||
break;
|
||||
|
||||
default:
|
||||
MessageBoxW(NULL, L"Dialog Error!", L"Message", MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* EOF */
|
Loading…
Add table
Add a link
Reference in a new issue