Author: janderwald
Date: Tue Oct 2 21:41:48 2007
New Revision: 29358
URL:
http://svn.reactos.org/svn/reactos?rev=29358&view=rev
Log:
- implement drive extra dialog
Modified:
trunk/reactos/dll/win32/shell32/drive.c
trunk/reactos/dll/win32/shell32/shell32_De.rc
Modified: trunk/reactos/dll/win32/shell32/drive.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/drive.c?…
==============================================================================
--- trunk/reactos/dll/win32/shell32/drive.c (original)
+++ trunk/reactos/dll/win32/shell32/drive.c Tue Oct 2 21:41:48 2007
@@ -266,7 +266,60 @@
LPARAM lParam
)
{
-
+ STARTUPINFOW si;
+ PROCESS_INFORMATION pi;
+ WCHAR szPath[MAX_PATH];
+ WCHAR szArg[MAX_PATH];
+ WCHAR * szDrive;
+ UINT length;
+ LPPROPSHEETPAGEW ppsp;
+
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ ppsp = (LPPROPSHEETPAGEW)lParam;
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)ppsp->lParam);
+ return TRUE;
+ case WM_COMMAND:
+ ZeroMemory( &si, sizeof(si) );
+ si.cb = sizeof(si);
+ ZeroMemory( &pi, sizeof(pi) );
+ if (!GetSystemDirectoryW(szPath, MAX_PATH))
+ break;
+ szDrive = (WCHAR*)GetWindowLongPtr(hwndDlg, DWLP_USER);
+ switch(LOWORD(wParam))
+ {
+ case 14000:
+ ///
+ /// FIXME
+ /// show checkdsk dialog
+ ///
+ break;
+ case 14001:
+ szArg[0] = L'"';
+ wcscpy(&szArg[1], szPath);
+ wcscat(szPath, L"\\mmc.exe");
+ wcscat(szArg, L"\\dfrg.msc\" ");
+ length = wcslen(szArg);
+ szArg[length] = szDrive[0];
+ szArg[length+1] = L':';
+ szArg[length+2] = L'\0';
+ if (CreateProcessW(szPath, szArg, NULL, NULL, FALSE, 0, NULL, NULL, &si,
&pi))
+ {
+ CloseHandle(pi.hProcess);
+ CloseHandle(pi.hThread);
+ }
+ break;
+ case 14002:
+ wcscat(szPath, L"\\ntbackup.exe");
+ if (CreateProcessW(szPath, NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si,
&pi))
+ {
+ CloseHandle(pi.hProcess);
+ CloseHandle(pi.hThread);
+ }
+ }
+ break;
+ }
return FALSE;
}
Modified: trunk/reactos/dll/win32/shell32/shell32_De.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32_…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shell32_De.rc (original)
+++ trunk/reactos/dll/win32/shell32/shell32_De.rc Tue Oct 2 21:41:48 2007
@@ -252,15 +252,24 @@
CHECKBOX "Laufwerk für schnelle Dateisuche indizieren", 14012, 15, 220, 165,
10, WS_DISABLED
}
-DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 130
+DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Extras"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
{
-}
-
-
-DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 130
+ GROUPBOX "Fehlerüberprüfung", -1, 5, 5, 230, 60
+ LTEXT "Bei Wahl dieser Option wird das Volume\nauf Fehler überprüft.", -1,
40, 25, 160, 20
+ PUSHBUTTON "Jetzt &prüfen", 14000, 130, 45, 90, 15, WS_TABSTOP
+ GROUPBOX "Defragmentierung", -1, 5, 65, 230, 60
+ LTEXT "Bei Wahl dieser Option werden die Dateien auf\ndem Volume
defragmentiert.", -1, 40, 85, 160, 20
+ PUSHBUTTON "Jetzt &defragmentieren", 14001, 130, 105, 90, 15, WS_TABSTOP
+ GROUPBOX "Sicherung", -1, 5, 130, 230, 60
+ LTEXT "Bei Wahl dieser Option werden die auf dem\nVolume gespeicherten Dateien
gesichert.", -1, 40, 150, 160, 20
+ PUSHBUTTON "Jetzt &sichern", 14002, 130, 170, 90, 15, WS_TABSTOP
+}
+
+
+DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Hardware"
FONT 8, "MS Shell Dlg", 0, 0, 0x0