ReactOS 0.4.16-dev-823-g9a093ec
settingsdlg.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Applications Manager
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Settings Dialog
5 * COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org)
6 * Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
7 */
8#include "rapps.h"
9
11
12static int CALLBACK
14{
15 switch (uMsg)
16 {
19 break;
21 return TRUE;
22 }
23 return 0;
24}
25
26static BOOL
28{
29 BOOL bRet = FALSE;
30 BROWSEINFOW bi;
31 CStringW szChooseFolderText;
32
33 szChooseFolderText.LoadStringW(IDS_CHOOSE_FOLDER_TEXT);
34
35 ZeroMemory(&bi, sizeof(bi));
36 bi.hwndOwner = hwnd;
37 bi.pidlRoot = NULL;
38 bi.lpszTitle = szChooseFolderText;
39 bi.ulFlags =
40 BIF_USENEWUI | BIF_DONTGOBELOWDOMAIN | BIF_RETURNONLYFSDIRS | /* BIF_BROWSEFILEJUNCTIONS | */ BIF_VALIDATE;
41
43 {
44 WCHAR szDir[MAX_PATH];
46 {
48 bi.lParam = (LPARAM)szDir;
49 }
50
51 LPITEMIDLIST lpItemList = SHBrowseForFolderW(&bi);
52 if (lpItemList && SHGetPathFromIDListW(lpItemList, szDir))
53 {
54 if (*szDir)
55 {
57 bRet = TRUE;
58 }
59 }
60
61 CoTaskMemFree(lpItemList);
63 }
64
65 return bRet;
66}
67
68static BOOL
69IsUrlValid(const WCHAR *Url)
70{
71 URL_COMPONENTSW UrlComponmentInfo = {0};
72 UrlComponmentInfo.dwStructSize = sizeof(UrlComponmentInfo);
73 UrlComponmentInfo.dwSchemeLength = 1;
74
75 BOOL bSuccess = InternetCrackUrlW(Url, wcslen(Url), 0, &UrlComponmentInfo);
76 if (!bSuccess)
77 {
78 return FALSE;
79 }
80
81 switch (UrlComponmentInfo.nScheme)
82 {
87 // supported
88 return TRUE;
89
90 default:
91 return FALSE;
92 }
93}
94
95namespace
96{
97static inline BOOL
99{
101}
102
103static inline void
105{
107}
108
109static void
111{
113 const struct {
114 WORD Id;
115 BOOL *Setting;
116 } Map[] = {
117 { IDS_CFG_SAVE_WINDOW_POS, &Info->bSaveWndPos },
118 { IDS_CFG_UPDATE_AVLIST, &Info->bUpdateAtStart },
119 { IDS_CFG_LOG_ENABLED, &Info->bLogEnabled },
120 { IDS_CFG_SMALL_ICONS, &Info->bSmallIcons },
121 };
122
123 if (Load)
124 {
127 LVCOLUMN lvc;
128 lvc.mask = LVCF_TEXT | LVCF_SUBITEM;
129 lvc.iSubItem = 0;
130 lvc.pszText = const_cast<PWSTR>(L"");
132
134 for (SIZE_T i = 0; i < _countof(Map); ++i)
135 {
137 Item.mask = LVIF_TEXT | LVIF_PARAM;
138 Item.iItem = 0x7fff;
139 Item.iSubItem = 0;
140 Item.lParam = Map[i].Id;
141 Name.LoadStringW(Map[i].Id);
142 Item.pszText = const_cast<PWSTR>(Name.GetString());
144 ListView_SetCheckState(hWndList, Item.iItem, *Map[i].Setting);
145 }
148 }
149 else
150 {
151 for (SIZE_T i = 0; i < _countof(Map); ++i)
152 {
153 LVFINDINFOW FindInfo = { LVFI_PARAM, NULL, Map[i].Id };
154 int Idx = ListView_FindItem(hWndList, -1, &FindInfo);
155 if (Idx >= 0)
156 *Map[i].Setting = ListView_GetCheckState(hWndList, Idx);
157 }
158 }
159}
160
161static VOID
163{
166
168 SetWindowTextW(hCtl, Info->szDownloadDir);
169 SendMessageW(hCtl, EM_LIMITTEXT, MAX_PATH - 1, 0);
170
172
173 if (Info->Proxy == 2)
174 {
177 }
178 else
179 {
182 }
183
185
186 EnableWindow(GetDlgItem(hDlg, IDC_SOURCE_URL), Info->bUseSource);
187
188 SetWindowTextW(GetDlgItem(hDlg, IDC_SOURCE_URL), Info->szSourceURL);
189 SetWindowTextW(GetDlgItem(hDlg, IDC_PROXY_SERVER), Info->szProxyServer);
190 SetWindowTextW(GetDlgItem(hDlg, IDC_NO_PROXY_FOR), Info->szNoProxyFor);
191}
192
193static INT_PTR CALLBACK
195{
196 SETTINGS_INFO &NewSettingsInfo = *g_pNewSettingsInfo;
197
198 switch (Msg)
199 {
200 case WM_INITDIALOG:
202 return TRUE;
203
204 case WM_SETTINGCHANGE:
205 case WM_THEMECHANGED:
209 break;
210
211 case WM_COMMAND:
212 {
213 switch (LOWORD(wParam))
214 {
215 case IDC_CHOOSE:
216 ChooseFolder(hDlg);
217 break;
218
221 break;
222
224 NewSettingsInfo.bUseSource = FALSE;
225 EnableWindow(GetDlgItem(hDlg, IDC_SOURCE_URL), NewSettingsInfo.bUseSource);
226 break;
227
228 case IDC_USE_SOURCE:
229 NewSettingsInfo.bUseSource = TRUE;
230 EnableWindow(GetDlgItem(hDlg, IDC_SOURCE_URL), NewSettingsInfo.bUseSource);
231 break;
232
234 NewSettingsInfo.Proxy = 0;
237 break;
238
239 case IDC_NO_PROXY:
240 NewSettingsInfo.Proxy = 1;
243 break;
244
245 case IDC_USE_PROXY:
246 NewSettingsInfo.Proxy = 2;
249 break;
250
252 FillDefaultSettings(&NewSettingsInfo);
253 InitSettingsControls(hDlg, &NewSettingsInfo);
254 break;
255
256 case IDOK:
257 {
258 HandleGeneralListItems(GetDlgItem(hDlg, IDC_GENERALLIST), NULL, &NewSettingsInfo);
259 if (SettingsInfo.bSmallIcons != NewSettingsInfo.bSmallIcons)
260 {
261 SendMessageW(hMainWnd, WM_SETTINGCHANGE, SPI_SETICONMETRICS, 0); // Note: WM_SETTINGCHANGE cannot be posted
263 }
264
265 CStringW szDir;
266 CStringW szSource;
267 CStringW szProxy;
268 CStringW szNoProxy;
269 DWORD dwAttr;
270
272 szDir.ReleaseBuffer();
273
277 szSource.ReleaseBuffer();
278
280 szProxy.ReleaseBuffer();
282 NewSettingsInfo.szProxyServer, _countof(NewSettingsInfo.szProxyServer), szProxy,
283 szProxy.GetLength() + 1);
284
286 szNoProxy.ReleaseBuffer();
288 NewSettingsInfo.szNoProxyFor, _countof(NewSettingsInfo.szNoProxyFor), szNoProxy,
289 szNoProxy.GetLength() + 1);
290
291 dwAttr = GetFileAttributesW(szDir);
292 if (dwAttr != INVALID_FILE_ATTRIBUTES && (dwAttr & FILE_ATTRIBUTE_DIRECTORY))
293 {
295 NewSettingsInfo.szDownloadDir, _countof(NewSettingsInfo.szDownloadDir), szDir,
296 szDir.GetLength() + 1);
297 }
298 else
299 {
300 CStringW szMsgText;
301 szMsgText.LoadStringW(IDS_CHOOSE_FOLDER_ERROR);
302
303 if (MessageBoxW(hDlg, szMsgText, NULL, MB_YESNO) == IDYES)
304 {
305 if (CreateDirectoryW(szDir, NULL))
306 {
307 EndDialog(hDlg, LOWORD(wParam));
308 }
309 }
310 else
311 {
313 break;
314 }
315 }
316
317 if (NewSettingsInfo.bUseSource && !IsUrlValid(szSource))
318 {
319 CStringW szMsgText;
320 szMsgText.LoadStringW(IDS_URL_INVALID);
321
322 MessageBoxW(hDlg, szMsgText, NULL, MB_OK);
324 break;
325 }
326 else
327 {
329 NewSettingsInfo.szSourceURL, _countof(NewSettingsInfo.szSourceURL), szSource,
330 szSource.GetLength() + 1);
331 }
332
333 SettingsInfo = NewSettingsInfo;
335 EndDialog(hDlg, LOWORD(wParam));
336 }
337 break;
338
339 case IDCANCEL:
340 EndDialog(hDlg, LOWORD(wParam));
341 break;
342 }
343 break;
344 }
345
346 case WM_NOTIFY:
347 {
349 if (wParam == IDC_GENERALLIST && nmia.hdr.code == NM_CLICK)
350 {
351 LVHITTESTINFO lvhti;
352 lvhti.pt = nmia.ptAction;
353 if (nmia.iItem != -1 && ListView_HitTest(nmia.hdr.hwndFrom, &lvhti) != -1)
354 {
355 if (lvhti.flags & (LVHT_ONITEMICON | LVHT_ONITEMLABEL))
358 }
359 }
360 break;
361 }
362 }
363
364 return FALSE;
365}
366} // namespace
367
368VOID
370{
371 SETTINGS_INFO NewSettingsInfo = SettingsInfo;
372 g_pNewSettingsInfo = &NewSettingsInfo;
373
375}
DWORD Id
static HWND hWndList[5+1]
Definition: SetParent.c:10
struct NameRec_ * Name
Definition: cdprocs.h:460
const DWORD ExStyle
Definition: appswitch.c:72
void SaveSettings(void)
Definition: settings.c:115
#define ID_REFRESH
Definition: resource.h:16
#define IDC_PROXY_SERVER
Definition: resource.h:57
#define IDC_NO_PROXY
Definition: resource.h:55
#define IDS_URL_INVALID
Definition: resource.h:111
#define IDS_CFG_LOG_ENABLED
Definition: resource.h:133
#define IDC_USE_SOURCE
Definition: resource.h:60
#define IDC_DEL_AFTER_INSTALL
Definition: resource.h:47
#define IDS_CFG_UPDATE_AVLIST
Definition: resource.h:132
#define IDC_NO_PROXY_FOR
Definition: resource.h:58
#define IDC_USE_PROXY
Definition: resource.h:56
#define IDD_SETTINGS_DIALOG
Definition: resource.h:64
#define IDC_PROXY_DEFAULT
Definition: resource.h:54
#define IDS_CHOOSE_FOLDER_TEXT
Definition: resource.h:109
#define IDC_CHOOSE
Definition: resource.h:49
#define IDS_CFG_SMALL_ICONS
Definition: resource.h:134
#define IDC_GENERALLIST
Definition: resource.h:44
#define IDC_DEFAULT_SETTINGS
Definition: resource.h:50
#define IDS_CFG_SAVE_WINDOW_POS
Definition: resource.h:131
#define IDC_SOURCE_URL
Definition: resource.h:61
#define IDC_DOWNLOAD_DIR_EDIT
Definition: resource.h:46
#define IDC_SOURCE_DEFAULT
Definition: resource.h:59
#define IDS_CHOOSE_FOLDER_ERROR
Definition: resource.h:110
SETTINGS_INFO SettingsInfo
Definition: winmain.cpp:21
VOID FillDefaultSettings(PSETTINGS_INFO pSettingsInfo)
Definition: settings.cpp:211
EXTERN_C LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi)
Definition: brfolder.cpp:1370
static void __cdecl CopyChars(_Out_writes_to_(nDestLen, nChars) XCHAR *pchDest, _In_ size_t nDestLen, _In_reads_opt_(nChars) const XCHAR *pchSrc, _In_ int nChars) noexcept
Definition: atlsimpstr.h:438
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:387
int GetLength() const noexcept
Definition: atlsimpstr.h:362
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
struct @1650 Msg[]
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define MAX_PATH
Definition: compat.h:34
#define CALLBACK
Definition: compat.h:35
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:90
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
static BOOLEAN bSuccess
Definition: drive.cpp:355
#define INTERNET_MAX_URL_LENGTH
Definition: session.c:1418
BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD dwUrlLength, DWORD dwFlags, URL_COMPONENTSW *lpUC)
Definition: internet.c:1625
HINSTANCE hInst
Definition: dxdiag.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define SUCCEEDED(hr)
Definition: intsafe.h:50
static HRESULT Load(IUnknown *pUnk, IStream *pStream)
Definition: lnktool.cpp:294
HWND hMainWnd
Definition: magnifier.c:32
static void HandleGeneralListItems(HWND hWndList, PSETTINGS_INFO Load, PSETTINGS_INFO Save)
static void AdjustListViewHeader(HWND hWndList)
static INT_PTR CALLBACK SettingsDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
static BOOL IsCheckedDlgItem(HWND hDlg, INT nIDDlgItem)
Definition: settingsdlg.cpp:98
static VOID InitSettingsControls(HWND hDlg, PSETTINGS_INFO Info)
unsigned int UINT
Definition: ndis.h:50
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1454
#define ListView_InsertItem(hwnd, pitem)
Definition: commctrl.h:2413
#define ListView_SetItemState(hwndLV, i, data, mask)
Definition: commctrl.h:2678
#define ListView_SetExtendedListViewStyleEx(hwndLV, dwMask, dw)
Definition: commctrl.h:2731
#define LVS_EX_LABELTIP
Definition: commctrl.h:2748
#define ListView_InsertColumn(hwnd, iCol, pcol)
Definition: commctrl.h:2641
#define ListView_SetCheckState(hwndLV, i, fCheck)
Definition: commctrl.h:2679
#define LVFI_PARAM
Definition: commctrl.h:2441
#define ListView_HitTest(hwndLV, pinfo)
Definition: commctrl.h:2521
#define ListView_SetColumnWidth(hwnd, iCol, cx)
Definition: commctrl.h:2653
#define LVS_EX_CHECKBOXES
Definition: commctrl.h:2736
#define NM_CLICK
Definition: commctrl.h:130
#define LVIS_SELECTED
Definition: commctrl.h:2324
#define LVIF_PARAM
Definition: commctrl.h:2316
#define LVHT_ONITEMICON
Definition: commctrl.h:2499
#define LVIF_TEXT
Definition: commctrl.h:2314
#define LVCF_SUBITEM
Definition: commctrl.h:2594
#define ListView_GetCheckState(hwndLV, i)
Definition: commctrl.h:2682
#define LVSCW_AUTOSIZE_USEHEADER
Definition: commctrl.h:2650
#define LVCF_TEXT
Definition: commctrl.h:2593
#define LVIS_FOCUSED
Definition: commctrl.h:2323
#define LVHT_ONITEMLABEL
Definition: commctrl.h:2500
#define ListView_FindItem(hwnd, iStart, plvfi)
Definition: commctrl.h:2475
#define LVCOLUMN
Definition: commctrl.h:2586
#define WM_NOTIFY
Definition: richedit.h:61
static BOOL ChooseFolder(HWND hwnd)
Definition: settingsdlg.cpp:27
SETTINGS_INFO * g_pNewSettingsInfo
Definition: settingsdlg.cpp:10
VOID CreateSettingsDlg(HWND hwnd)
static int CALLBACK BrowseFolderCallback(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
Definition: settingsdlg.cpp:13
static BOOL IsUrlValid(const WCHAR *Url)
Definition: settingsdlg.cpp:69
#define BIF_VALIDATE
Definition: shlobj.h:1222
#define BIF_DONTGOBELOWDOMAIN
Definition: shlobj.h:1218
#define BIF_RETURNONLYFSDIRS
Definition: shlobj.h:1217
#define BFFM_VALIDATEFAILED
Definition: shlobj.h:1257
#define BIF_USENEWUI
Definition: shlobj.h:1224
#define BFFM_SETSELECTIONW
Definition: shlobj.h:1246
#define BFFM_INITIALIZED
Definition: shlobj.h:1236
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
#define _countof(array)
Definition: sndvol32.h:70
WCHAR szDownloadDir[MAX_PATH]
Definition: settings.h:10
BOOL bUseSource
Definition: settings.h:24
BOOL bDelInstaller
Definition: settings.h:11
WCHAR szSourceURL[INTERNET_MAX_URL_LENGTH]
Definition: settings.h:25
WCHAR szNoProxyFor[MAX_PATH]
Definition: settings.h:22
BOOL bSmallIcons
Definition: settings.h:12
WCHAR szProxyServer[MAX_PATH]
Definition: settings.h:21
DWORD dwStructSize
Definition: wininet.h:211
INTERNET_SCHEME nScheme
Definition: wininet.h:214
DWORD dwSchemeLength
Definition: wininet.h:213
BFFCALLBACK lpfn
Definition: shlobj.h:1205
PCIDLIST_ABSOLUTE pidlRoot
Definition: shlobj.h:1201
UINT ulFlags
Definition: shlobj.h:1204
HWND hwndOwner
Definition: shlobj.h:1200
LPCWSTR lpszTitle
Definition: shlobj.h:1203
LPARAM lParam
Definition: shlobj.h:1206
UINT code
Definition: winuser.h:3162
HWND hwndFrom
Definition: winuser.h:3160
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT_PTR
Definition: typedefs.h:64
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
static int Save(const char **args)
Definition: vfdcmd.c:1851
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1394
#define ZeroMemory
Definition: winbase.h:1737
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define INTERNET_SCHEME_FTP
Definition: winhttp.h:44
#define INTERNET_SCHEME_HTTP
Definition: winhttp.h:42
#define INTERNET_SCHEME_HTTPS
Definition: winhttp.h:43
@ INTERNET_SCHEME_FILE
Definition: wininet.h:143
#define EM_LIMITTEXT
Definition: winuser.h:2003
#define IDCANCEL
Definition: winuser.h:834
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define DialogBoxW(i, t, p, f)
Definition: winuser.h:4402
#define WM_COMMAND
Definition: winuser.h:1743
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define WM_INITDIALOG
Definition: winuser.h:1742
#define MB_YESNO
Definition: winuser.h:820
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1629
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:833
#define BM_SETCHECK
Definition: winuser.h:1924
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
#define WM_SETTINGCHANGE
Definition: winuser.h:1632
HWND WINAPI SetFocus(_In_opt_ HWND)
#define SendMessage
Definition: winuser.h:5855
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define MB_OK
Definition: winuser.h:793
HWND WINAPI GetParent(_In_ HWND)
BOOL WINAPI CheckRadioButton(_In_ HWND, _In_ int, _In_ int, _In_ int)
_In_ int nIDDlgItem
Definition: winuser.h:4622
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define IDYES
Definition: winuser.h:838
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BST_CHECKED
Definition: winuser.h:197
#define BM_GETCHECK
Definition: winuser.h:1921
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
__wchar_t WCHAR
Definition: xmlstorage.h:180