ReactOS  0.4.14-dev-114-gc8cbd56
optionswnd.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS API Test GUI
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE:
5  * PURPOSE: options dialog implementation
6  * COPYRIGHT: Copyright 2008 Ged Murphy <gedmurphy@reactos.org>
7  *
8  */
9 
10 #include <precomp.h>
11 
12 static BOOL
14  LPARAM lParam)
15 {
16  PMAIN_WND_INFO pInfo;
17 
18  pInfo = (PMAIN_WND_INFO)lParam;
19 
20  pInfo->hBrowseDlg = hDlg;
21 
22  SetWindowLongPtr(hDlg,
24  (LONG_PTR)pInfo);
25 
26  return TRUE;
27 }
28 
29 
32  UINT Message,
33  WPARAM wParam,
34  LPARAM lParam)
35 {
36  PMAIN_WND_INFO pInfo;
37 
38  //UNREFERENCED_PARAM(
39 
40  /* Get the window context */
41  pInfo = (PMAIN_WND_INFO)GetWindowLongPtr(hDlg,
43  if (pInfo == NULL && Message != WM_INITDIALOG)
44  {
45  goto HandleDefaultMessage;
46  }
47 
48  switch(Message)
49  {
50  case WM_INITDIALOG:
51  return OnInitBrowseDialog(hDlg, lParam);
52 
53  case WM_COMMAND:
54  {
55  switch (LOWORD(wParam))
56  {
57  case IDOK:
58  {
60  {
61  pInfo->bRunOnStart = TRUE;
62  }
63  else
64  {
65  pInfo->bRunOnStart = FALSE;
66  }
67 
69  {
70  pInfo->bHideConsole = TRUE;
71  }
72  else
73  {
74  pInfo->bHideConsole = FALSE;
75  }
76 
77  EndDialog(hDlg,
78  LOWORD(wParam));
79 
80  return TRUE;
81  }
82 
83  case IDCANCEL:
84  {
85  EndDialog(hDlg,
86  LOWORD(wParam));
87 
88  return TRUE;
89  }
90  }
91 
92  break;
93  }
94 HandleDefaultMessage:
95  default:
96  return FALSE;
97  }
98 
99  return FALSE;
100 }
#define TRUE
Definition: types.h:120
#define IDOK
Definition: winuser.h:824
BOOL bRunOnStart
Definition: precomp.h:42
#define CALLBACK
Definition: compat.h:27
UINT_PTR WPARAM
Definition: windef.h:207
#define SetWindowLongPtr
Definition: treelist.c:70
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
unsigned int BOOL
Definition: ntddk_ex.h:94
#define GWLP_USERDATA
Definition: treelist.c:63
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define BM_GETCHECK
Definition: winuser.h:1900
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
struct _MAIN_WND_INFO * PMAIN_WND_INFO
CHAR Message[80]
Definition: alive.c:5
#define IDC_RUNONSTART
Definition: resource.h:25
HWND hBrowseDlg
Definition: precomp.h:25
#define WM_COMMAND
Definition: winuser.h:1722
BOOL bHideConsole
Definition: precomp.h:43
BOOL CALLBACK OptionsDlgProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam)
Definition: optionswnd.c:31
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDC_HIDECONSOLE
Definition: resource.h:24
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define BST_CHECKED
Definition: winuser.h:197
static BOOL OnInitBrowseDialog(HWND hDlg, LPARAM lParam)
Definition: optionswnd.c:13
#define GetWindowLongPtr
Definition: treelist.c:73
#define IDCANCEL
Definition: winuser.h:825
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82