ReactOS  0.4.12-dev-75-g00dd17e
gui.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS shutdown/logoff utility
4  * FILE: base/applications/shutdown/gui.c
5  * PURPOSE: Shows a GUI used for managing multiple remote shutdown/restarts
6  * PROGRAMMERS: Lee Schroeder
7  */
8 
9 #include "precomp.h"
10 
12 {
13  switch(msg)
14  {
15  case WM_INITDIALOG:
16  break;
17 
18  case WM_COMMAND:
19  switch(LOWORD(wparam))
20  {
21  case IDC_OK:
22  EndDialog(hwnd, IDC_OK);
23  break;
24  case IDC_CANCEL:
25  EndDialog(hwnd, IDC_CANCEL);
26  break;
27  }
28  break;
29 
30  case WM_CLOSE:
31  EndDialog(hwnd, 0);
32  break;
33 
34  default:
35  return FALSE;
36  }
37 
38  return TRUE;
39 }
40 
41 /*
42  * NOTE: Until the ability to shutdown computers remotely, the GUI feature
43  * can't be fully implemented.
44  */
46 {
49  NULL,
51 
52  switch (result)
53  {
54  case IDC_OK:
55  MessageBoxW(NULL, L"This function is unimplemented.", L"Unimplemented", MB_OK);
56  break;
57 
58  case IDC_CANCEL:
59  /* Exits the program */
60  break;
61 
62  default:
63  MessageBoxW(NULL, L"Dialog Error!", L"Message", MB_OK);
64  return FALSE;
65  }
66 
67  return TRUE;
68 }
69 
70 /* EOF */
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
#define CALLBACK
Definition: compat.h:27
int32_t INT_PTR
Definition: typedefs.h:62
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
UINT_PTR WPARAM
Definition: windef.h:207
LONG_PTR LPARAM
Definition: windef.h:208
UINT msg
Definition: msvc.h:92
smooth NULL
Definition: ftsmooth.c:416
#define IDC_CANCEL
Definition: resource.h:60
#define DialogBoxW(i, t, p, f)
Definition: winuser.h:4268
unsigned int BOOL
Definition: ntddk_ex.h:94
#define IDD_GUI
Definition: resource.h:56
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
#define WM_CLOSE
Definition: winuser.h:1603
BOOL ShutdownGuiMain(struct CommandLineOptions opts)
Definition: gui.c:45
unsigned int UINT
Definition: ndis.h:50
static const WCHAR L[]
Definition: oid.c:1087
#define WM_COMMAND
Definition: winuser.h:1716
UINT WPARAM LPARAM lparam
Definition: msvc.h:92
#define GetModuleHandle
Definition: winbase.h:3641
#define MB_OK
Definition: winuser.h:784
INT_PTR CALLBACK ShutdownGuiProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: gui.c:11
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
GLuint64EXT * result
Definition: glext.h:11304
#define IDC_OK
Definition: resource.h:59
#define WM_INITDIALOG
Definition: winuser.h:1715
#define LOWORD(l)
Definition: pedump.c:82
UINT WPARAM wparam
Definition: msvc.h:92