47 for (
d = 0;
d < 26;
d++)
49 if (DriveMask & (1 <<
d))
96 wchar_t PercentText[100];
97 static double OldPercent = 200.0f;
98 static wstring OldStatus =
L"Non";
106 if (NewPercent > 100.0f)
108 if (NewPercent < 0.0f)
110 if (NewPercent != OldPercent)
112 swprintf (PercentText,
L"%6.2f%%", NewPercent);
115 (
WPARAM) (
int)(NewPercent * 100.0f), 0);
116 OldPercent = NewPercent;
120 if (NewStatus != OldStatus)
123 wstring::iterator it;
141 OldStatus = NewStatus;
153 wstring(
L" (C) 2000 by Rick Brewster"));
155 return (DefaultText);
170 wstring (
L" - ") + DefragText;
238 L"Software\\Fraginator",
251 *RegKeyResult = RegKey;
343 RegSize =
sizeof (DTypeVal);
426 static bool ReEntrance =
false;
HINSTANCE GlobalHInstance
bool DoneRegKey(HKEY RegKey)
static void InitDialog(HWND Dlg)
void SetDisables(HWND Dlg)
bool GetRegKeys(HKEY *RegKeyResult)
wstring GetDefragTitle(void)
vector< wstring > DrivesList
INT_PTR CALLBACK MainDialogProc(HWND Dlg, UINT Msg, WPARAM WParam, LPARAM LParam)
wstring GetDefaultTitle(void)
void UpdatePriority(HWND Dlg)
void UpdateDefragInfo(HWND Dlg)
INT_PTR CALLBACK ReportDialogProc(HWND Dlg, UINT Msg, WPARAM WParam, LPARAM LParam)
Defragment * StartDefragThread(wstring Drive, DefragType Method, HANDLE &Handle)
#define RegCloseKey(hKey)
DriveVolume & GetVolume(void)
wstring GetStatusString(void)
void SetDoLimitLength(bool L)
DefragType GetDefragType(void)
double GetStatusPercent(void)
wstring GetRootPath(void)
#define GetCurrentProcess()
BOOL WINAPI SetPriorityClass(IN HANDLE hProcess, IN DWORD dwPriorityClass)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define IDC_PRIORITY_LIST
#define REG_OPTION_NON_VOLATILE
void push_back(const _Tp &__x=_STLP_DEFAULT_CONSTRUCTED(_Tp))
void resize(size_type __new_size, const _Tp &__x=_STLP_DEFAULT_CONSTRUCTED(_Tp))
_In_ WDFINTERRUPT _In_ WDF_INTERRUPT_POLICY _In_ WDF_INTERRUPT_PRIORITY Priority
#define NORMAL_PRIORITY_CLASS
#define BELOW_NORMAL_PRIORITY_CLASS
#define HIGH_PRIORITY_CLASS
DWORD WINAPI GetLogicalDrives(void)
#define IDLE_PRIORITY_CLASS
#define ABOVE_NORMAL_PRIORITY_CLASS
#define HKEY_CURRENT_USER
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define SendDlgItemMessage
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)