1
0

uiEraseMedium.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #pragma once
  2. #include "./main.h"
  3. #include "./eraseMedium.h"
  4. #define ERASEMEDIUMUI_OK 0x000
  5. #define ERASEMEDIUMUI_ERROR 0x001
  6. #define ERASEMEDIUMUI_CANCELED 0x002
  7. #define ERASEMEDIUMUI_PRIMOSDKERROR 0x101
  8. #define ERASEMEDIUMUI_UNABLETOCREATEDIALOG 0x102
  9. #define ERASEMEDIUMUI_MESSAGEPUMPERROR 0x103
  10. #define ERASEMEDIUMUI_DRIVENOTSET 0x104
  11. #define ERASEMEDIUMUI_PRIMOSDKNOTSET 0x105
  12. #define ERASEMEDIUMUI_UNABLETOCREATEOBJECT 0x106
  13. class EraseMediumUI
  14. {
  15. public:
  16. BURNLIB_API EraseMediumUI(void);
  17. BURNLIB_API ~EraseMediumUI(void);
  18. public:
  19. BURNLIB_API DWORD Erase(DWORD drive, BOOL discCheck, HWND ownerWnd);
  20. BURNLIB_API DWORD SetEject(int ejectmode);
  21. protected:
  22. static LRESULT CALLBACK PrepareWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  23. static LRESULT CALLBACK EraseWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  24. void OnPrepareInit(HWND hwndDlg);
  25. void OnPrepareOk();
  26. void OnEraseInit(HWND hwndDlg);
  27. void OnEraseTimerClock(void);
  28. void OnEraseClose(DWORD exitCode);
  29. static DWORD CALLBACK OnEraseNotify(void *sender, void *param, DWORD eraseCode, DWORD primoCode);
  30. protected:
  31. DWORD drive;
  32. HWND prepareWnd;
  33. HWND eraseWnd;
  34. EraseMedium *eraseMedium;
  35. DWORD eraseMode;
  36. DWORD startTick;
  37. unsigned int actualTime;
  38. unsigned int estimateTime;
  39. DWORD eraseCode;
  40. DWORD primoCode;
  41. BOOL discCheck;
  42. };