mirror of
https://github.com/reactos/reactos.git
synced 2024-09-10 21:04:26 +00:00
![Amine Khaldi](/assets/img/avatar_default.png)
* Create a branch for some evul shell experiments. svn path=/branches/shell-experiments/; revision=61927
71 lines
1.7 KiB
C
71 lines
1.7 KiB
C
/*
|
|
* 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 */
|