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.

207 lines
5.5 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1996-2000 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // WaitDlg.h
  7. //
  8. // Implementation File:
  9. // WaitDlg.cpp
  10. //
  11. // Description:
  12. // Definition of the CWaitDlg class.
  13. //
  14. // Maintained By:
  15. // David Potter (davidp) 07-NOV-2000
  16. //
  17. // Notes:
  18. //
  19. /////////////////////////////////////////////////////////////////////////////
  20. #pragma once
  21. /////////////////////////////////////////////////////////////////////////////
  22. // Forward Class Declarations
  23. /////////////////////////////////////////////////////////////////////////////
  24. class CWaitDlg;
  25. class CWaitForResourceOfflineDlg;
  26. /////////////////////////////////////////////////////////////////////////////
  27. // External Class Declarations
  28. /////////////////////////////////////////////////////////////////////////////
  29. /////////////////////////////////////////////////////////////////////////////
  30. // External Class Declarations
  31. /////////////////////////////////////////////////////////////////////////////
  32. /////////////////////////////////////////////////////////////////////////////
  33. // Type Definitions
  34. /////////////////////////////////////////////////////////////////////////////
  35. /////////////////////////////////////////////////////////////////////////////
  36. // Include Files
  37. /////////////////////////////////////////////////////////////////////////////
  38. #ifndef _RES_H_
  39. #include "Res.h" // for CResource
  40. #endif
  41. /////////////////////////////////////////////////////////////////////////////
  42. //++
  43. //
  44. // class CWaitDlg
  45. //
  46. // Description:
  47. // Display a dialog while waiting for something to complete.
  48. //
  49. //--
  50. /////////////////////////////////////////////////////////////////////////////
  51. class CWaitDlg : public CDialog
  52. {
  53. public:
  54. CWaitDlg(
  55. LPCTSTR pcszMessageIn,
  56. UINT idsTitleIn = 0,
  57. CWnd * pwndParentIn = NULL
  58. );
  59. // Dialog Data
  60. //{{AFX_DATA(CWaitDlg)
  61. enum { IDD = IDD_WAIT };
  62. CStatic m_staticMessage;
  63. CStatic m_iconProgress;
  64. CString m_strMessage;
  65. //}}AFX_DATA
  66. // Overrides
  67. // ClassWizard generated virtual function overrides
  68. //{{AFX_VIRTUAL(CWaitDlg)
  69. protected:
  70. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  71. //}}AFX_VIRTUAL
  72. // Implementation
  73. protected:
  74. // Generated message map functions
  75. //{{AFX_MSG(CWaitDlg)
  76. virtual BOOL OnInitDialog();
  77. afx_msg void OnTimer(UINT nIDTimer);
  78. afx_msg void OnClose();
  79. //}}AFX_MSG
  80. DECLARE_MESSAGE_MAP()
  81. // Override this function to provide your own implementation
  82. // To exit out of the dialog, call CDialog::OnOK() here.
  83. virtual void OnTimerTick( void )
  84. {
  85. CDialog::OnOK();
  86. } //*** CWaitDlg::OnTimerTick()
  87. void UpdateIndicator( void );
  88. void CloseTimer( void );
  89. CString m_strTitle;
  90. UINT m_idsTitle;
  91. UINT_PTR m_timerId;
  92. int m_nTickCounter;
  93. int m_nTotalTickCount;
  94. }; //*** class CWaitDlg
  95. /////////////////////////////////////////////////////////////////////////////
  96. //++
  97. //
  98. // class CWaitForResourceOfflineDlg
  99. //
  100. // Description:
  101. // Display a dialog while waiting for a resource to go offline.
  102. //
  103. //--
  104. /////////////////////////////////////////////////////////////////////////////
  105. class CWaitForResourceOfflineDlg : public CWaitDlg
  106. {
  107. public:
  108. CWaitForResourceOfflineDlg(
  109. CResource const * pResIn,
  110. CWnd * pwndParentIn = NULL
  111. );
  112. // Dialog Data
  113. //{{AFX_DATA(CWaitForResourceOfflineDlg)
  114. enum { IDD = IDD_WAIT };
  115. //}}AFX_DATA
  116. // Overrides
  117. // ClassWizard generated virtual function overrides
  118. //{{AFX_VIRTUAL(CWaitForResourceOfflineDlg)
  119. protected:
  120. //}}AFX_VIRTUAL
  121. // Implementation
  122. protected:
  123. // Generated message map functions
  124. //{{AFX_MSG(CWaitForResourceOfflineDlg)
  125. virtual BOOL OnInitDialog();
  126. //}}AFX_MSG
  127. DECLARE_MESSAGE_MAP()
  128. // Override this function to provide your own implementation
  129. // To exit out of the dialog, call CDialog::OnOK() here.
  130. virtual void OnTimerTick( void );
  131. CResource const * m_pRes;
  132. }; //*** class CWaitForResourceOfflineDlg
  133. /////////////////////////////////////////////////////////////////////////////
  134. //++
  135. //
  136. // class CWaitForResourceOnlineDlg
  137. //
  138. // Description:
  139. // Display a dialog while waiting for a resource to go online.
  140. //
  141. //--
  142. /////////////////////////////////////////////////////////////////////////////
  143. class CWaitForResourceOnlineDlg : public CWaitDlg
  144. {
  145. public:
  146. CWaitForResourceOnlineDlg(
  147. CResource const * pResIn,
  148. CWnd * pwndParentIn = NULL
  149. );
  150. // Dialog Data
  151. //{{AFX_DATA(CWaitForResourceOnlineDlg)
  152. enum { IDD = IDD_WAIT };
  153. //}}AFX_DATA
  154. // Overrides
  155. // ClassWizard generated virtual function overrides
  156. //{{AFX_VIRTUAL(CWaitForResourceOnlineDlg)
  157. protected:
  158. //}}AFX_VIRTUAL
  159. // Implementation
  160. protected:
  161. // Generated message map functions
  162. //{{AFX_MSG(CWaitForResourceOnlineDlg)
  163. virtual BOOL OnInitDialog();
  164. //}}AFX_MSG
  165. DECLARE_MESSAGE_MAP()
  166. // Override this function to provide your own implementation
  167. // To exit out of the dialog, call CDialog::OnOK() here.
  168. virtual void OnTimerTick( void );
  169. CResource const * m_pRes;
  170. }; //*** class CWaitForResourceOnlineDlg