ReactOS 0.4.15-dev-7942-gd23573b
optionswnd.c File Reference
#include <precomp.h>
Include dependency graph for optionswnd.c:

Go to the source code of this file.

Functions

static BOOL OnInitBrowseDialog (HWND hDlg, LPARAM lParam)
 
BOOL CALLBACK OptionsDlgProc (HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam)
 

Function Documentation

◆ OnInitBrowseDialog()

static BOOL OnInitBrowseDialog ( HWND  hDlg,
LPARAM  lParam 
)
static

Definition at line 13 of file optionswnd.c.

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}
struct _MAIN_WND_INFO * PMAIN_WND_INFO
LPARAM lParam
Definition: combotst.c:139
#define TRUE
Definition: types.h:120
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
HWND hBrowseDlg
Definition: precomp.h:25
#define SetWindowLongPtr
Definition: treelist.c:70
#define GWLP_USERDATA
Definition: treelist.c:63

Referenced by OptionsDlgProc().

◆ OptionsDlgProc()

BOOL CALLBACK OptionsDlgProc ( HWND  hDlg,
UINT  Message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 31 of file optionswnd.c.

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}
WPARAM wParam
Definition: combotst.c:138
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
static const WCHAR Message[]
Definition: register.c:74
#define IDC_HIDECONSOLE
Definition: resource.h:24
#define IDC_RUNONSTART
Definition: resource.h:25
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
#define GetWindowLongPtr
Definition: treelist.c:73
#define IDCANCEL
Definition: winuser.h:831
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_INITDIALOG
Definition: winuser.h:1739
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:830
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BST_CHECKED
Definition: winuser.h:197
#define BM_GETCHECK
Definition: winuser.h:1918
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)