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.

182 lines
4.2 KiB

  1. // YesToAll.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "cluadmin.h"
  5. #include "YesToAll.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CYesToAllDialog dialog
  13. /////////////////////////////////////////////////////////////////////////////
  14. /////////////////////////////////////////////////////////////////////////////
  15. // Message Maps
  16. BEGIN_MESSAGE_MAP(CYesToAllDialog, CDialog)
  17. //{{AFX_MSG_MAP(CYesToAllDialog)
  18. ON_BN_CLICKED(IDYES, OnYes)
  19. ON_BN_CLICKED(IDNO, OnNo)
  20. ON_BN_CLICKED(IDC_YTA_YESTOALL, OnYesToAll)
  21. //}}AFX_MSG_MAP
  22. ON_COMMAND(IDCANCEL, OnNo)
  23. ON_COMMAND(IDOK, OnYes)
  24. END_MESSAGE_MAP()
  25. /////////////////////////////////////////////////////////////////////////////
  26. //++
  27. //
  28. // CYesToAllDialog::CYesToAllDialog
  29. //
  30. // Routine Description:
  31. // Default constructor.
  32. //
  33. // Arguments:
  34. // pszMessage [IN] Message to display.
  35. // pParent [IN] Parent window for the dialog.
  36. //
  37. // Return Value:
  38. // None.
  39. //
  40. //--
  41. /////////////////////////////////////////////////////////////////////////////
  42. CYesToAllDialog::CYesToAllDialog(LPCTSTR pszMessage, CWnd * pParent /*=NULL*/)
  43. : CDialog(IDD, pParent)
  44. {
  45. //{{AFX_DATA_INIT(CYesToAllDialog)
  46. m_strMessage = _T("");
  47. //}}AFX_DATA_INIT
  48. ASSERT(pszMessage != NULL);
  49. m_pszMessage = pszMessage;
  50. } //*** CYesToAllDialog::CYesToAllDialog()
  51. /////////////////////////////////////////////////////////////////////////////
  52. //++
  53. //
  54. // CYesToAllDialog::DoDataExchange
  55. //
  56. // Routine Description:
  57. // Do data exchange between the dialog and the class.
  58. //
  59. // Arguments:
  60. // pDX [IN OUT] Data exchange object
  61. //
  62. // Return Value:
  63. // None.
  64. //
  65. //--
  66. /////////////////////////////////////////////////////////////////////////////
  67. void CYesToAllDialog::DoDataExchange(CDataExchange * pDX)
  68. {
  69. CDialog::DoDataExchange(pDX);
  70. //{{AFX_DATA_MAP(CYesToAllDialog)
  71. DDX_Text(pDX, IDC_YTA_MESSAGE, m_strMessage);
  72. //}}AFX_DATA_MAP
  73. } //*** CYesToAllDialog::DoDataExchange()
  74. /////////////////////////////////////////////////////////////////////////////
  75. //++
  76. //
  77. // CYesToAllDialog::OnInitDialog
  78. //
  79. // Routine Description:
  80. // Handler for the WM_INITDIALOG message.
  81. //
  82. // Arguments:
  83. // None.
  84. //
  85. // Return Value:
  86. // TRUE Focus not set yet.
  87. // FALSE Focus already set.
  88. //
  89. //--
  90. /////////////////////////////////////////////////////////////////////////////
  91. BOOL CYesToAllDialog::OnInitDialog(void)
  92. {
  93. LPCTSTR pszAppName;
  94. m_strMessage = m_pszMessage;
  95. CDialog::OnInitDialog();
  96. pszAppName = AfxGetApp()->m_pszAppName;
  97. SetWindowText(pszAppName);
  98. return TRUE; // return TRUE unless you set the focus to a control
  99. // EXCEPTION: OCX Property Pages should return FALSE
  100. } //*** CYesToAllDialog::OnInitDialog()
  101. /////////////////////////////////////////////////////////////////////////////
  102. //++
  103. //
  104. // CYesToAllDialog::OnYes
  105. //
  106. // Routine Description:
  107. // Handler for the BN_CLICKED message on the Yes push button.
  108. //
  109. // Arguments:
  110. // None.
  111. //
  112. // Return Value:
  113. // None.
  114. //
  115. //--
  116. /////////////////////////////////////////////////////////////////////////////
  117. void CYesToAllDialog::OnYes(void)
  118. {
  119. EndDialog(IDYES);
  120. } //*** CYesToAllDialog::OnYes()
  121. /////////////////////////////////////////////////////////////////////////////
  122. //++
  123. //
  124. // CYesToAllDialog::OnNo
  125. //
  126. // Routine Description:
  127. // Handler for the BN_CLICKED message on the No push button.
  128. //
  129. // Arguments:
  130. // None.
  131. //
  132. // Return Value:
  133. // None.
  134. //
  135. //--
  136. /////////////////////////////////////////////////////////////////////////////
  137. void CYesToAllDialog::OnNo(void)
  138. {
  139. EndDialog(IDNO);
  140. } //*** CYesToAllDialog::OnNo()
  141. /////////////////////////////////////////////////////////////////////////////
  142. //++
  143. //
  144. // CYesToAllDialog::OnYesToAll
  145. //
  146. // Routine Description:
  147. // Handler for the BN_CLICKED message on the Yes To All push button.
  148. //
  149. // Arguments:
  150. // None.
  151. //
  152. // Return Value:
  153. // None.
  154. //
  155. //--
  156. /////////////////////////////////////////////////////////////////////////////
  157. void CYesToAllDialog::OnYesToAll(void)
  158. {
  159. EndDialog(IDC_YTA_YESTOALL);
  160. } //*** CYesToAllDialog::OnYesToAll()