Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.4 KiB

  1. // rebootdlg.h : Declaration of the CRebootDlg
  2. #ifndef __REBOOTDLG_H_
  3. #define __REBOOTDLG_H_
  4. #include "resource.h" // main symbols
  5. #include <atlhost.h>
  6. /////////////////////////////////////////////////////////////////////////////
  7. // CRebootDlg
  8. class CRebootDlg :
  9. public CAxDialogImpl<CRebootDlg>
  10. {
  11. public:
  12. CRebootDlg()
  13. {
  14. }
  15. ~CRebootDlg()
  16. {
  17. }
  18. enum { IDD = IDD_REBOOTDLG };
  19. BEGIN_MSG_MAP(CRebootDlg)
  20. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  21. COMMAND_ID_HANDLER(IDOK, OnOK)
  22. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  23. END_MSG_MAP()
  24. // Handler prototypes:
  25. // LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  26. // LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  27. // LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  28. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  29. {
  30. #ifdef RUN_FROM_MSDEV // It's a pain to accidentally restart your system while debugging.
  31. ::EnableWindow(GetDlgItem(IDOK), FALSE);
  32. #endif
  33. return 1; // Let the system set the focus
  34. }
  35. LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
  36. {
  37. EndDialog(wID);
  38. return 0;
  39. }
  40. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
  41. {
  42. EndDialog(wID);
  43. return 0;
  44. }
  45. };
  46. #endif //__REBOOTDLG_H_