ReactOS 0.4.15-dev-7659-ga55345b
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
12static BOOL
15{
16 PMAIN_WND_INFO pInfo;
17
18 pInfo = (PMAIN_WND_INFO)lParam;
19
20 pInfo->hBrowseDlg = hDlg;
21
24 (LONG_PTR)pInfo);
25
26 return TRUE;
27}
28
29
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 }
94HandleDefaultMessage:
95 default:
96 return FALSE;
97 }
98
99 return FALSE;
100}
struct _MAIN_WND_INFO * PMAIN_WND_INFO
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CALLBACK
Definition: compat.h:35
static const WCHAR Message[]
Definition: register.c:74
unsigned int BOOL
Definition: ntddk_ex.h:94
#define IDC_HIDECONSOLE
Definition: resource.h:24
#define IDC_RUNONSTART
Definition: resource.h:25
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
BOOL CALLBACK OptionsDlgProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam)
Definition: optionswnd.c:31
static BOOL OnInitBrowseDialog(HWND hDlg, LPARAM lParam)
Definition: optionswnd.c:13
#define LOWORD(l)
Definition: pedump.c:82
BOOL bHideConsole
Definition: precomp.h:43
BOOL bRunOnStart
Definition: precomp.h:42
HWND hBrowseDlg
Definition: precomp.h:25
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
#define GWLP_USERDATA
Definition: treelist.c:63
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define IDCANCEL
Definition: winuser.h:830
#define WM_COMMAND
Definition: winuser.h:1739
#define WM_INITDIALOG
Definition: winuser.h:1738
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:829
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BST_CHECKED
Definition: winuser.h:197
#define BM_GETCHECK
Definition: winuser.h:1917
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)