ReactOS  0.4.13-dev-39-g8b6696f
recycler_prop.cpp
Go to the documentation of this file.
1 /*
2  * Trash virtual folder support. The trashing engine is implemented in trash.c
3  *
4  * Copyright (C) 2006 Mikolaj Zalewski
5  * Copyright (C) 2009 Andrew Hill
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21 
22 #include <precomp.h>
23 
25 
26 typedef struct
27 {
32 
34 {
35  if (bEnable)
36  {
37  SendDlgItemMessage(hwndDlg, 14001, BM_SETCHECK, BST_UNCHECKED, 0);
38  EnableWindow(GetDlgItem(hwndDlg, 14002), FALSE);
39  SendDlgItemMessage(hwndDlg, 14003, BM_SETCHECK, BST_CHECKED, 0);
40  }
41  else
42  {
43  SendDlgItemMessage(hwndDlg, 14001, BM_SETCHECK, BST_CHECKED, 0);
44  EnableWindow(GetDlgItem(hwndDlg, 14002), TRUE);
45  SendDlgItemMessage(hwndDlg, 14003, BM_SETCHECK, BST_UNCHECKED, 0);
46  }
47 }
48 
49 
50 static VOID
51 InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive)
52 {
53  WCHAR CurDrive = L'A';
54  WCHAR szDrive[] = L"A:\\";
55  DWORD dwDrives;
56  WCHAR szName[100];
57  WCHAR szVolume[100];
58  DWORD MaxComponent, Flags;
59  DWORD dwSerial;
60  LVCOLUMNW lc;
61  HWND hDlgCtrl;
62  LVITEMW li;
63  INT itemCount;
64  ULARGE_INTEGER TotalNumberOfFreeBytes, TotalNumberOfBytes, FreeBytesAvailable;
65  RECT rect;
66  int columnSize;
67  int defIndex = 0;
68  DWORD dwSize;
69  PDRIVE_ITEM_CONTEXT pItem = NULL, pDefault = NULL, pFirst = NULL;
70 
71  hDlgCtrl = GetDlgItem(hwndDlg, 14000);
72 
73  if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_LOCATION, szVolume, sizeof(szVolume) / sizeof(WCHAR)))
74  szVolume[0] = 0;
75 
76  GetClientRect(hDlgCtrl, &rect);
77 
78  memset(&lc, 0, sizeof(LV_COLUMN) );
80 
81  columnSize = 140; //FIXME
82  lc.iSubItem = 0;
83  lc.fmt = LVCFMT_FIXED_WIDTH;
84  lc.cx = columnSize;
85  lc.cchTextMax = wcslen(szVolume);
86  lc.pszText = szVolume;
87  (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMNW, 0, (LPARAM)&lc);
88 
89  if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_DISKSPACE, szVolume, sizeof(szVolume) / sizeof(WCHAR)))
90  szVolume[0] = 0;
91 
92  lc.iSubItem = 1;
93  lc.cx = rect.right - rect.left - columnSize;
94  lc.cchTextMax = wcslen(szVolume);
95  lc.pszText = szVolume;
96  (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMNW, 1, (LPARAM)&lc);
97 
98  dwDrives = GetLogicalDrives();
99  itemCount = 0;
100  do
101  {
102  if ((dwDrives & 0x1))
103  {
104  UINT Type = GetDriveTypeW(szDrive);
105  if (Type == DRIVE_FIXED) //FIXME
106  {
107  if (!GetVolumeInformationW(szDrive, szName, sizeof(szName) / sizeof(WCHAR), &dwSerial, &MaxComponent, &Flags, NULL, 0))
108  {
109  szName[0] = 0;
110  dwSerial = -1;
111  }
112 
113  swprintf(szVolume, L"%s (%c:)", szName, szDrive[0]);
114  memset(&li, 0x0, sizeof(LVITEMW));
115  li.mask = LVIF_TEXT | LVIF_PARAM;
116  li.iSubItem = 0;
117  li.pszText = szVolume;
118  li.iItem = itemCount;
119  SendMessageW(hDlgCtrl, LVM_INSERTITEMW, 0, (LPARAM)&li);
120  if (GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailable , &TotalNumberOfBytes, &TotalNumberOfFreeBytes))
121  {
122  if (StrFormatByteSizeW(TotalNumberOfFreeBytes.QuadPart, szVolume, sizeof(szVolume) / sizeof(WCHAR)))
123  {
124 
126  if (pItem)
127  {
128  swprintf(szName, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Bitbucket\\Volume\\%04X-%04X", LOWORD(dwSerial), HIWORD(dwSerial));
129  dwSize = sizeof(DWORD);
131  dwSize = sizeof(DWORD);
133  pItem->dwSerial = dwSerial;
134  li.mask = LVIF_PARAM;
135  li.lParam = (LPARAM)pItem;
136  (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li);
137  if (CurDrive == DefaultDrive)
138  {
139  defIndex = itemCount;
140  pDefault = pItem;
141  }
142  }
143  if (!pFirst)
144  pFirst = pItem;
145 
146  li.mask = LVIF_TEXT;
147  li.iSubItem = 1;
148  li.pszText = szVolume;
149  li.iItem = itemCount;
150  (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li);
151  }
152  }
153  itemCount++;
154  }
155  }
156  CurDrive++;
157  szDrive[0] = CurDrive;
158  dwDrives = (dwDrives >> 1);
159  } while(dwDrives);
160 
161  if (!pDefault)
162  pDefault = pFirst;
163  if (pDefault)
164  {
165  toggleNukeOnDeleteOption(hwndDlg, pDefault->dwNukeOnDelete);
166  SetDlgItemInt(hwndDlg, 14002, pDefault->dwMaxCapacity, FALSE);
167  }
168  ZeroMemory(&li, sizeof(li));
169  li.mask = LVIF_STATE;
170  li.stateMask = (UINT) - 1;
172  li.iItem = defIndex;
173  (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li);
174 
175 }
176 
177 static BOOL StoreDriveSettings(HWND hwndDlg)
178 {
179  int iCount, iIndex;
180  HWND hDlgCtrl = GetDlgItem(hwndDlg, 14000);
181  LVITEMW li;
182  PDRIVE_ITEM_CONTEXT pItem;
183  HKEY hKey, hSubKey;
184  WCHAR szSerial[20];
185  DWORD dwSize;
186 
187 
188  if (RegCreateKeyExW(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Bitbucket\\Volume", 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS)
189  return FALSE;
190 
191  iCount = ListView_GetItemCount(hDlgCtrl);
192 
193  ZeroMemory(&li, sizeof(li));
194  li.mask = LVIF_PARAM;
195 
196  for(iIndex = 0; iIndex < iCount; iIndex++)
197  {
198  li.iItem = iIndex;
199  if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)&li))
200  {
201  pItem = (PDRIVE_ITEM_CONTEXT)li.lParam;
202  swprintf(szSerial, L"%04X-%04X", LOWORD(pItem->dwSerial), HIWORD(pItem->dwSerial));
203  if (RegCreateKeyExW(hKey, szSerial, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS)
204  {
205  dwSize = sizeof(DWORD);
206  RegSetValueExW(hSubKey, L"NukeOnDelete", 0, REG_DWORD, (LPBYTE)&pItem->dwNukeOnDelete, dwSize);
207  dwSize = sizeof(DWORD);
208  RegSetValueExW(hSubKey, L"MaxCapacity", 0, REG_DWORD, (LPBYTE)&pItem->dwMaxCapacity, dwSize);
209  RegCloseKey(hSubKey);
210  }
211  }
212  }
213  RegCloseKey(hKey);
214  return TRUE;
215 
216 }
217 
219 {
220  int iCount, iIndex;
221  HWND hDlgCtrl = GetDlgItem(hwndDlg, 14000);
222  LVITEMW li;
223 
224  iCount = ListView_GetItemCount(hDlgCtrl);
225 
226  ZeroMemory(&li, sizeof(li));
227  li.mask = LVIF_PARAM;
228 
229  for(iIndex = 0; iIndex < iCount; iIndex++)
230  {
231  li.iItem = iIndex;
232  if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)&li))
233  {
234  HeapFree(GetProcessHeap(), 0, (LPVOID)li.lParam);
235  }
236  }
237 }
238 
239 static INT
241 {
242  HWND hDlgCtrl;
243  UINT iItemCount, iIndex;
244 
245  hDlgCtrl = GetDlgItem(hwndDlg, 14000);
246  if (!hDlgCtrl)
247  return -1;
248 
249  iItemCount = ListView_GetItemCount(hDlgCtrl);
250  if (!iItemCount)
251  return -1;
252 
253  ZeroMemory(li, sizeof(LVITEMW));
254  li->mask = LVIF_PARAM | LVIF_STATE;
255  li->stateMask = (UINT) - 1;
256  for (iIndex = 0; iIndex < iItemCount; iIndex++)
257  {
258  li->iItem = iIndex;
259  if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)li))
260  {
261  if (li->state & LVIS_SELECTED)
262  return iIndex;
263  }
264  }
265  return -1;
266 
267 }
268 
269 static INT_PTR CALLBACK
271  HWND hwndDlg,
272  UINT uMsg,
273  WPARAM wParam,
274  LPARAM lParam
275 )
276 {
277  LPPSHNOTIFY lppsn;
278  LPNMLISTVIEW lppl;
279  LVITEMW li;
280  PDRIVE_ITEM_CONTEXT pItem;
281  BOOL bSuccess;
282  UINT uResult;
284  DWORD dwStyle;
285 
286  switch(uMsg)
287  {
288  case WM_INITDIALOG:
290  InitializeRecycleBinDlg(hwndDlg, (WCHAR)page->lParam);
291  dwStyle = (DWORD) SendDlgItemMessage(hwndDlg, 14000, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
292  dwStyle = dwStyle | LVS_EX_FULLROWSELECT;
293  SendDlgItemMessage(hwndDlg, 14000, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle);
294  if (GetDlgCtrlID((HWND)wParam) != 14000)
295  {
296  SetFocus(GetDlgItem(hwndDlg, 14000));
297  return FALSE;
298  }
299  return TRUE;
300  case WM_COMMAND:
301  switch(LOWORD(wParam))
302  {
303  case 14001:
305  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
306  break;
307  case 14003:
308  toggleNukeOnDeleteOption(hwndDlg, TRUE);
309  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
310  break;
311  case 14004:
312  PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
313  break;
314  }
315  break;
316  case WM_NOTIFY:
317  lppsn = (LPPSHNOTIFY) lParam;
318  lppl = (LPNMLISTVIEW) lParam;
319  if (lppsn->hdr.code == PSN_APPLY)
320  {
321  if (GetDefaultItem(hwndDlg, &li) > -1)
322  {
323  pItem = (PDRIVE_ITEM_CONTEXT)li.lParam;
324  if (pItem)
325  {
326  uResult = GetDlgItemInt(hwndDlg, 14002, &bSuccess, FALSE);
327  if (bSuccess)
328  pItem->dwMaxCapacity = uResult;
329  if (SendDlgItemMessageW(hwndDlg, 14003, BM_GETCHECK, 0, 0) == BST_CHECKED)
330  pItem->dwNukeOnDelete = TRUE;
331  else
332  pItem->dwNukeOnDelete = FALSE;
333  }
334  }
335  if (StoreDriveSettings(hwndDlg))
336  {
338  return TRUE;
339  }
340  }
341  else if (lppl->hdr.code == LVN_ITEMCHANGING)
342  {
343  ZeroMemory(&li, sizeof(li));
344  li.mask = LVIF_PARAM;
345  li.iItem = lppl->iItem;
346  if (!SendMessageW(lppl->hdr.hwndFrom, LVM_GETITEMW, 0, (LPARAM)&li))
347  return TRUE;
348 
349  pItem = (PDRIVE_ITEM_CONTEXT)li.lParam;
350  if (!pItem)
351  return TRUE;
352 
353  if (!(lppl->uOldState & LVIS_FOCUSED) && (lppl->uNewState & LVIS_FOCUSED))
354  {
355  /* new focused item */
357  SetDlgItemInt(hwndDlg, 14002, pItem->dwMaxCapacity, FALSE);
358  }
359  else if ((lppl->uOldState & LVIS_FOCUSED) && !(lppl->uNewState & LVIS_FOCUSED))
360  {
361  /* kill focus */
362  uResult = GetDlgItemInt(hwndDlg, 14002, &bSuccess, FALSE);
363  if (bSuccess)
364  pItem->dwMaxCapacity = uResult;
365  if (SendDlgItemMessageW(hwndDlg, 14003, BM_GETCHECK, 0, 0) == BST_CHECKED)
366  pItem->dwNukeOnDelete = TRUE;
367  else
368  pItem->dwNukeOnDelete = FALSE;
369  }
370  return TRUE;
371 
372  }
373  break;
374  case WM_DESTROY:
375  FreeDriveItemContext(hwndDlg);
376  break;
377  }
378  return FALSE;
379 }
380 
382 {
383  HPROPSHEETPAGE hpsp[1];
384  PROPSHEETHEADERW psh;
385  HPROPSHEETPAGE hprop;
386 
387  BOOL ret;
388 
389 
390  ZeroMemory(&psh, sizeof(PROPSHEETHEADERW));
391  psh.dwSize = sizeof(PROPSHEETHEADERW);
394  psh.hwndParent = NULL;
395  psh.phpage = hpsp;
397 
399  if (!hprop)
400  {
401  ERR("Failed to create property sheet\n");
402  return FALSE;
403  }
404  hpsp[psh.nPages] = hprop;
405  psh.nPages++;
406 
407 
408  ret = PropertySheetW(&psh);
409  if (ret < 0)
410  return FALSE;
411  else
412  return TRUE;
413 }
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
Definition: reg.c:1975
HWND hwndParent
Definition: prsht.h:277
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
Definition: string.c:2376
#define TRUE
Definition: types.h:120
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define LVCF_WIDTH
Definition: commctrl.h:2559
Type
Definition: Type.h:6
#define ERROR_SUCCESS
Definition: deptool.c:10
UINT uNewState
Definition: commctrl.h:3008
GLint x0
Definition: linetemp.h:95
#define LVCF_TEXT
Definition: commctrl.h:2560
struct _PSHNOTIFY * LPPSHNOTIFY
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define LV_COLUMN
Definition: commctrl.h:2519
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
#define IDS_RECYCLEBIN_FOLDER_NAME
Definition: shresdef.h:232
#define CALLBACK
Definition: compat.h:27
#define LVS_EX_FULLROWSELECT
Definition: commctrl.h:2706
#define ZeroMemory
Definition: winbase.h:1635
HWND WINAPI SetFocus(_In_opt_ HWND)
UINT_PTR WPARAM
Definition: windef.h:207
#define SendDlgItemMessage
Definition: winuser.h:5708
struct _PROPSHEETHEADERW PROPSHEETHEADERW
#define PSN_APPLY
Definition: prsht.h:117
int32_t INT_PTR
Definition: typedefs.h:62
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define DWORD
Definition: nt_native.h:44
int32_t INT
Definition: typedefs.h:56
static BOOLEAN bSuccess
Definition: drive.cpp:417
#define SetWindowLongPtr
Definition: treelist.c:70
static BOOL StoreDriveSettings(HWND hwndDlg)
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
UINT stateMask
Definition: commctrl.h:2336
#define DWLP_MSGRESULT
Definition: winuser.h:864
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1094
#define LVN_ITEMCHANGING
Definition: commctrl.h:3102
BOOL SH_ShowRecycleBinProperties(WCHAR sDrive)
#define LVIF_TEXT
Definition: commctrl.h:2281
#define LVCF_SUBITEM
Definition: commctrl.h:2561
UINT code
Definition: winuser.h:3112
int WINAPI GetDlgCtrlID(_In_ HWND)
NMHDR hdr
Definition: prsht.h:312
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
LPCWSTR pszCaption
Definition: prsht.h:283
unsigned int BOOL
Definition: ntddk_ex.h:94
#define LVM_INSERTCOLUMNW
Definition: commctrl.h:2604
static INT GetDefaultItem(HWND hwndDlg, LVITEMW *li)
int iSubItem
Definition: commctrl.h:2334
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
LPARAM lParam
Definition: commctrl.h:2340
smooth NULL
Definition: ftsmooth.c:416
UINT WINAPI GetDlgItemInt(_In_ HWND, _In_ int, _Out_opt_ PBOOL, _In_ BOOL)
#define LVIS_SELECTED
Definition: commctrl.h:2291
UINT uOldState
Definition: commctrl.h:3009
LONG_PTR LPARAM
Definition: windef.h:208
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2279
Definition: module.h:566
#define BM_GETCHECK
Definition: winuser.h:1879
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2896
#define WM_DESTROY
Definition: winuser.h:1591
#define RRF_RT_DWORD
Definition: driver.c:581
#define IDD_RECYCLE_BIN_PROPERTIES
Definition: shresdef.h:325
#define KEY_WRITE
Definition: nt_native.h:1031
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4917
#define IDS_RECYCLEBIN_LOCATION
Definition: shresdef.h:135
#define PSP_DEFAULT
Definition: prsht.h:22
#define BM_SETCHECK
Definition: winuser.h:1882
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
if(!(yy_init))
Definition: macro.lex.yy.c:714
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define PSH_PROPTITLE
Definition: prsht.h:40
#define PropSheet_Changed(d, w)
Definition: prsht.h:326
HINSTANCE hInstance
Definition: prsht.h:278
LPWSTR pszText
Definition: commctrl.h:2337
#define swprintf(buf, format,...)
Definition: sprintf.c:56
struct DRIVE_ITEM_CONTEXT * PDRIVE_ITEM_CONTEXT
LPWSTR pszText
Definition: commctrl.h:2539
unsigned long DWORD
Definition: ntddk_ex.h:95
#define LVM_SETEXTENDEDLISTVIEWSTYLE
Definition: commctrl.h:2696
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
DWORD dwSize
Definition: prsht.h:275
DWORD dwFlags
Definition: prsht.h:276
UINT mask
Definition: commctrl.h:2332
#define PSNRET_NOERROR
Definition: prsht.h:129
int ret
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
static const WCHAR L[]
Definition: oid.c:1250
WINE_DEFAULT_DEBUG_CHANNEL(CRecycleBin)
static void toggleNukeOnDeleteOption(HWND hwndDlg, BOOL bEnable)
#define WM_COMMAND
Definition: winuser.h:1716
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
Definition: disk.c:497
HWND hwndFrom
Definition: winuser.h:3110
#define BST_UNCHECKED
Definition: winuser.h:199
UINT state
Definition: commctrl.h:2335
#define LVM_GETEXTENDEDLISTVIEWSTYLE
Definition: commctrl.h:2699
#define DRIVE_FIXED
Definition: winbase.h:249
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HPROPSHEETPAGE * phpage
Definition: prsht.h:291
DWORD WINAPI GetLogicalDrives(VOID)
Definition: disk.c:110
int cchTextMax
Definition: commctrl.h:2540
#define ERR(fmt,...)
Definition: debug.h:109
BOOL WINAPI GetVolumeInformationW(IN LPCWSTR lpRootPathName, IN LPWSTR lpVolumeNameBuffer, IN DWORD nVolumeNameSize, OUT LPDWORD lpVolumeSerialNumber OPTIONAL, OUT LPDWORD lpMaximumComponentLength OPTIONAL, OUT LPDWORD lpFileSystemFlags OPTIONAL, OUT LPWSTR lpFileSystemNameBuffer OPTIONAL, IN DWORD nFileSystemNameSize)
Definition: volume.c:226
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI GetParent(_In_ HWND)
static VOID FreeDriveItemContext(HWND hwndDlg)
#define LVM_INSERTITEMW
Definition: commctrl.h:2376
#define LVCF_FMT
Definition: commctrl.h:2558
_In_ BOOL bEnable
Definition: winddi.h:3426
static INT_PTR CALLBACK RecycleBinDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
struct tagNMLISTVIEW * LPNMLISTVIEW
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static VOID InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive)
unsigned int UINT
Definition: ndis.h:50
#define IDS_RECYCLEBIN_DISKSPACE
Definition: shresdef.h:136
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define BST_CHECKED
Definition: winuser.h:197
#define LVM_SETITEMW
Definition: commctrl.h:2369
static const WCHAR szName[]
Definition: msipriv.h:1194
#define LVM_GETITEMW
Definition: commctrl.h:2362
#define LVIF_PARAM
Definition: commctrl.h:2283
#define HIWORD(l)
Definition: typedefs.h:246
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HPROPSHEETPAGE SH_CreatePropertySheetPage(LPCSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle)
#define LVIF_STATE
Definition: commctrl.h:2284
#define memset(x, y, z)
Definition: compat.h:39
#define REG_DWORD
Definition: sdbapi.c:596
#define WM_INITDIALOG
Definition: winuser.h:1715
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define HeapFree(x, y, z)
Definition: compat.h:394
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
#define LVIS_FOCUSED
Definition: commctrl.h:2290
#define PROPSHEETPAGE
Definition: prsht.h:371
#define WM_NOTIFY
Definition: richedit.h:61
BOOL WINAPI GetDiskFreeSpaceExW(IN LPCWSTR lpDirectoryName OPTIONAL, OUT PULARGE_INTEGER lpFreeBytesAvailableToCaller, OUT PULARGE_INTEGER lpTotalNumberOfBytes, OUT PULARGE_INTEGER lpTotalNumberOfFreeBytes)
Definition: disk.c:342