1 /*****************************************************************************
5 *****************************************************************************/
9 #include "Fraginator.h"
11 #include "DriveVolume.h"
12 #include "Defragment.h"
13 #include "MainDialog.h"
19 HINSTANCE GlobalHInstance
= NULL
;
20 Defragment
*Defrag
= NULL
;
23 wWinMain(HINSTANCE HInstance
,
28 INITCOMMONCONTROLSEX InitControls
;
32 _CrtSetDbgFlag (_CRTDBG_LEAK_CHECK_DF
| _CrtSetDbgFlag (_CRTDBG_REPORT_FLAG
));
33 _CrtSetReportMode (_CRT_WARN
, _CRTDBG_MODE_FILE
);
34 _CrtSetReportFile (_CRT_WARN
, _CRTDBG_FILE_STDOUT
);
35 _CrtSetReportMode (_CRT_ERROR
, _CRTDBG_MODE_FILE
);
36 _CrtSetReportFile (_CRT_ERROR
, _CRTDBG_FILE_STDOUT
);
37 _CrtSetReportMode (_CRT_ASSERT
, _CRTDBG_MODE_FILE
);
38 _CrtSetReportFile (_CRT_ASSERT
, _CRTDBG_FILE_STDOUT
);
41 GlobalHInstance
= HInstance
;
43 // We want our progress bar! NOW!
44 InitControls
.dwSize
= sizeof (InitControls
);
45 InitControls
.dwICC
= ICC_WIN95_CLASSES
;
46 InitCommonControlsEx (&InitControls
);
50 MessageBox (GetDesktopWindow(), L
"Sorry, this program requires Windows 2000.", L
"Error", MB_OK
);
54 DialogBox (HInstance
, MAKEINTRESOURCE (IDD_MAIN
), GetDesktopWindow(), MainDialogProc
);
58 if (_CrtDumpMemoryLeaks ())
59 MessageBox (NULL
, L
"Click OK to quit", L
"Leaks", MB_OK
);