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.

145 lines
3.2 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. /*++
  3. Copyright (C) Microsoft Corporation, 1998 - 1999
  4. Module Name:
  5. IASIPEditorPage.cpp
  6. Abstract:
  7. Implementation file for the IPEditorPage class.
  8. Revision History:
  9. mmaguire 06/25/98 - revised Baogang Yao's original implementation
  10. --*/
  11. //////////////////////////////////////////////////////////////////////////////
  12. //////////////////////////////////////////////////////////////////////////////
  13. // BEGIN INCLUDES
  14. //
  15. // standard includes:
  16. //
  17. #include "Precompiled.h"
  18. //
  19. // where we can find declaration for main class in this file:
  20. //
  21. #include "IASIPEditorPage.h"
  22. //
  23. // where we can find declarations needed in this file:
  24. //
  25. //
  26. // END INCLUDES
  27. //////////////////////////////////////////////////////////////////////////////
  28. IMPLEMENT_DYNCREATE(IPEditorPage, CHelpDialog)
  29. BEGIN_MESSAGE_MAP(IPEditorPage, CHelpDialog)
  30. //{{AFX_MSG_MAP(IPEditorPage)
  31. // ON_WM_CONTEXTMENU()
  32. // ON_WM_HELPINFO()
  33. //}}AFX_MSG_MAP
  34. END_MESSAGE_MAP()
  35. //////////////////////////////////////////////////////////////////////////////
  36. /*++
  37. IPEditorPage::IPEditorPage
  38. Constructor
  39. --*/
  40. //////////////////////////////////////////////////////////////////////////////
  41. IPEditorPage::IPEditorPage() : CHelpDialog(IPEditorPage::IDD)
  42. {
  43. TRACE(_T("IPEditorPage::IPEditorPage\n"));
  44. //{{AFX_DATA_INIT(IPEditorPage)
  45. m_strAttrFormat = _T("");
  46. m_strAttrName = _T("");
  47. m_strAttrType = _T("");
  48. //}}AFX_DATA_INIT
  49. m_dwIpAddr = 0;
  50. m_fIpAddrPreSet = FALSE;
  51. // init for using IPAddress common control
  52. INITCOMMONCONTROLSEX INITEX;
  53. INITEX.dwSize = sizeof(INITCOMMONCONTROLSEX);
  54. INITEX.dwICC = ICC_INTERNET_CLASSES;
  55. ::InitCommonControlsEx(&INITEX);
  56. }
  57. //////////////////////////////////////////////////////////////////////////////
  58. /*++
  59. IPEditorPage::~IPEditorPage
  60. --*/
  61. //////////////////////////////////////////////////////////////////////////////
  62. IPEditorPage::~IPEditorPage()
  63. {
  64. TRACE(_T("IPEditorPage::~IPEditorPage\n"));
  65. }
  66. //////////////////////////////////////////////////////////////////////////////
  67. /*++
  68. IPEditorPage::DoDataExchange
  69. --*/
  70. //////////////////////////////////////////////////////////////////////////////
  71. void IPEditorPage::DoDataExchange(CDataExchange* pDX)
  72. {
  73. TRACE(_T("IPEditorPage::DoDataExchange\n"));
  74. CHelpDialog::DoDataExchange(pDX);
  75. //{{AFX_DATA_MAP(IPEditorPage)
  76. DDX_Text(pDX, IDC_IAS_STATIC_ATTRFORMAT, m_strAttrFormat);
  77. DDX_Text(pDX, IDC_IAS_STATIC_ATTRNAME, m_strAttrName);
  78. DDX_Text(pDX, IDC_IAS_STATIC_ATTRTYPE, m_strAttrType);
  79. //}}AFX_DATA_MAP
  80. if(pDX->m_bSaveAndValidate) // save data to this class
  81. {
  82. // ip adress control
  83. SendDlgItemMessage(IDC_IAS_EDIT_IPADDR, IPM_GETADDRESS, 0, (LPARAM)&m_dwIpAddr);
  84. }
  85. else // put to dialog
  86. {
  87. // ip adress control
  88. if ( m_fIpAddrPreSet)
  89. {
  90. SendDlgItemMessage(IDC_IAS_EDIT_IPADDR, IPM_SETADDRESS, 0, m_dwIpAddr);
  91. }
  92. else
  93. {
  94. SendDlgItemMessage(IDC_IAS_EDIT_IPADDR, IPM_CLEARADDRESS, 0, 0L);
  95. }
  96. }
  97. }
  98. /////////////////////////////////////////////////////////////////////////////
  99. // IPEditorPage message handlers