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.

98 lines
2.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 -99 **/
  4. /**********************************************************************/
  5. /*
  6. delrcdlg.cpp
  7. The delete/tombstone record(s) dialog
  8. FILE HISTORY:
  9. */
  10. #include "stdafx.h"
  11. #include "winssnap.h"
  12. #include "delrcdlg.h"
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CDeleteRecordDlg dialog
  20. CDeleteRecordDlg::CDeleteRecordDlg(CWnd* pParent /*=NULL*/)
  21. : CBaseDialog(CDeleteRecordDlg::IDD, pParent)
  22. {
  23. //{{AFX_DATA_INIT(CDeleteRecordDlg)
  24. m_nDeleteRecord = 0;
  25. //}}AFX_DATA_INIT
  26. m_fMultiple = FALSE;
  27. }
  28. void CDeleteRecordDlg::DoDataExchange(CDataExchange* pDX)
  29. {
  30. CBaseDialog::DoDataExchange(pDX);
  31. //{{AFX_DATA_MAP(CDeleteRecordDlg)
  32. DDX_Radio(pDX, IDC_RADIO_DELETE, m_nDeleteRecord);
  33. //}}AFX_DATA_MAP
  34. }
  35. BEGIN_MESSAGE_MAP(CDeleteRecordDlg, CBaseDialog)
  36. //{{AFX_MSG_MAP(CDeleteRecordDlg)
  37. //}}AFX_MSG_MAP
  38. END_MESSAGE_MAP()
  39. /////////////////////////////////////////////////////////////////////////////
  40. // CDeleteRecordDlg message handlers
  41. void CDeleteRecordDlg::OnOK()
  42. {
  43. UpdateData();
  44. // warn the user
  45. if (m_nDeleteRecord != 0)
  46. {
  47. if (AfxMessageBox(IDS_WARN_TOMBSTONE, MB_YESNO) == IDNO)
  48. {
  49. return;
  50. }
  51. }
  52. CBaseDialog::OnOK();
  53. }
  54. BOOL CDeleteRecordDlg::OnInitDialog()
  55. {
  56. CBaseDialog::OnInitDialog();
  57. if (m_fMultiple)
  58. {
  59. CString strText;
  60. // update the strings, title first
  61. strText.LoadString(IDS_DELETE_MULTIPLE_TITLE);
  62. SetWindowText(strText);
  63. // now the static text
  64. strText.LoadString(IDS_DELETE_MULTIPLE_STATIC);
  65. GetDlgItem(IDC_STATIC_DELETE_DESC)->SetWindowText(strText);
  66. // now the radio buttons
  67. strText.LoadString(IDS_DELETE_MULTIPLE_THIS_SERVER);
  68. GetDlgItem(IDC_RADIO_DELETE)->SetWindowText(strText);
  69. strText.LoadString(IDS_DELETE_MULTIPLE_TOMBSTONE);
  70. GetDlgItem(IDC_RADIO_TOMBSTONE)->SetWindowText(strText);
  71. }
  72. return TRUE; // return TRUE unless you set the focus to a control
  73. // EXCEPTION: OCX Property Pages should return FALSE
  74. }