ReactOS  0.4.12-dev-51-ge94618b
settingsdlg.cpp File Reference
#include "rapps.h"
Include dependency graph for settingsdlg.cpp:

Go to the source code of this file.

Namespaces

 anonymous_namespace{settingsdlg.cpp}
 

Functions

BOOL ChooseFolder (HWND hwnd)
 
BOOL anonymous_namespace{settingsdlg.cpp}::IsCheckedDlgItem (HWND hDlg, INT nIDDlgItem)
 
VOID anonymous_namespace{settingsdlg.cpp}::InitSettingsControls (HWND hDlg, PSETTINGS_INFO Info)
 
INT_PTR CALLBACK anonymous_namespace{settingsdlg.cpp}::SettingsDlgProc (HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
 
VOID CreateSettingsDlg (HWND hwnd)
 

Variables

SETTINGS_INFO NewSettingsInfo
 

Function Documentation

◆ ChooseFolder()

BOOL ChooseFolder ( HWND  hwnd)

Definition at line 13 of file settingsdlg.cpp.

Referenced by anonymous_namespace{settingsdlg.cpp}::SettingsDlgProc().

14 {
15  BOOL bRet = FALSE;
16  BROWSEINFOW bi;
17  ATL::CStringW szChooseFolderText;
18 
19  szChooseFolderText.LoadStringW(IDS_CHOOSE_FOLDER_TEXT);
20 
21  ZeroMemory(&bi, sizeof(bi));
22  bi.hwndOwner = hwnd;
23  bi.pidlRoot = NULL;
24  bi.lpszTitle = szChooseFolderText.GetString();
25  bi.ulFlags = BIF_USENEWUI | BIF_DONTGOBELOWDOMAIN | BIF_RETURNONLYFSDIRS | /* BIF_BROWSEFILEJUNCTIONS | */ BIF_VALIDATE;
26 
28  {
29  ATL::CStringW szBuf;
30 
31  LPITEMIDLIST lpItemList = SHBrowseForFolderW(&bi);
32  if (lpItemList && SHGetPathFromIDListW(lpItemList, szBuf.GetBuffer(MAX_PATH)))
33  {
34  szBuf.ReleaseBuffer();
35  if (!szBuf.IsEmpty())
36  {
38  bRet = TRUE;
39  }
40  }
41  else
42  {
43  szBuf.ReleaseBuffer();
44  }
45 
46  CoTaskMemFree(lpItemList);
48  }
49 
50  return bRet;
51 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
#define IDC_DOWNLOAD_DIR_EDIT
Definition: resource.h:43
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1280
HWND hwndOwner
Definition: shlobj.h:1103
#define ZeroMemory
Definition: winbase.h:1635
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:372
#define BIF_DONTGOBELOWDOMAIN
Definition: shlobj.h:1121
smooth NULL
Definition: ftsmooth.c:416
#define IDS_CHOOSE_FOLDER_TEXT
Definition: resource.h:98
LPCWSTR lpszTitle
Definition: shlobj.h:1106
LPCITEMIDLIST pidlRoot
Definition: shlobj.h:1104
unsigned int BOOL
Definition: ntddk_ex.h:94
#define MAX_PATH
Definition: compat.h:26
PCXSTR GetString() const
Definition: atlsimpstr.h:361
#define BIF_USENEWUI
Definition: shlobj.h:1127
LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi)
Definition: brsfolder.c:1156
bool IsEmpty() const
Definition: atlsimpstr.h:379
UINT ulFlags
Definition: shlobj.h:1107
#define BIF_RETURNONLYFSDIRS
Definition: shlobj.h:1120
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:1994
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
Definition: compobj.c:1938
#define BIF_VALIDATE
Definition: shlobj.h:1125
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ CreateSettingsDlg()

VOID CreateSettingsDlg ( HWND  hwnd)

Definition at line 213 of file settingsdlg.cpp.

Referenced by CMainWindow::OnCommand().

214 {
217  hwnd,
219 }
#define IDD_SETTINGS_DIALOG
Definition: resource.h:58
INT_PTR CALLBACK SettingsDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: settingsdlg.cpp:82
#define DialogBoxW(i, t, p, f)
Definition: winuser.h:4268
HINSTANCE hInst
Definition: dxdiag.c:13
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

Variable Documentation

◆ NewSettingsInfo

SETTINGS_INFO NewSettingsInfo