Source code of Windows XP (NT5)
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.

176 lines
2.4 KiB

  1. /*++
  2. Copyright (c) 1994-1998 Microsoft Corporation
  3. Module Name :
  4. hdrdlg.cpp
  5. Abstract:
  6. HTTP Headers dialog
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Project:
  10. Internet Services Manager
  11. Revision History:
  12. --*/
  13. //
  14. // Include Files
  15. //
  16. #include "stdafx.h"
  17. #include "common.h"
  18. #include "inetprop.h"
  19. #include "InetMgrapp.h"
  20. #include "shts.h"
  21. #include "w3sht.h"
  22. #include "resource.h"
  23. //#include "fltdlg.h"
  24. #include "hdrdlg.h"
  25. #ifdef _DEBUG
  26. #define new DEBUG_NEW
  27. #undef THIS_FILE
  28. static char THIS_FILE[] = __FILE__;
  29. #endif
  30. CHeaderDlg::CHeaderDlg(
  31. IN LPCTSTR lpstrHeader,
  32. IN LPCTSTR lpstrValue,
  33. IN CWnd * pParent OPTIONAL
  34. )
  35. /*++
  36. Routine Description:
  37. Constructor for HTTP heade dialog
  38. Arguments:
  39. LPCTSTR lpstrHeader : Header string
  40. LPCTSTR lpstrValue : Value string
  41. CWnd * pParent : Parent window
  42. Return Value:
  43. None
  44. --*/
  45. : CDialog(CHeaderDlg::IDD, pParent)
  46. {
  47. //{{AFX_DATA_INIT(CHeaderDlg)
  48. m_strHeader = lpstrHeader ? lpstrHeader : _T("");
  49. m_strValue = lpstrValue ? lpstrValue : _T("");
  50. //}}AFX_DATA_INIT
  51. }
  52. void
  53. CHeaderDlg::DoDataExchange(
  54. IN CDataExchange * pDX
  55. )
  56. /*++
  57. Routine Description:
  58. Initialise/Store control data
  59. Arguments:
  60. CDataExchange * pDX - DDX/DDV control structure
  61. Return Value:
  62. None
  63. --*/
  64. {
  65. CDialog::DoDataExchange(pDX);
  66. //{{AFX_DATA_MAP(CHeaderDlg)
  67. DDX_Control(pDX, IDC_EDIT_HEADER, m_edit_Header);
  68. DDX_Control(pDX, IDOK, m_button_Ok);
  69. DDX_Text(pDX, IDC_EDIT_HEADER, m_strHeader);
  70. DDX_Text(pDX, IDC_EDIT_VALUE, m_strValue);
  71. //}}AFX_DATA_MAP
  72. }
  73. //
  74. // Message Map
  75. //
  76. BEGIN_MESSAGE_MAP(CHeaderDlg, CDialog)
  77. //{{AFX_MSG_MAP(CHeaderDlg)
  78. ON_EN_CHANGE(IDC_EDIT_HEADER, OnChangeEditHeader)
  79. //}}AFX_MSG_MAP
  80. END_MESSAGE_MAP()
  81. //
  82. // Message Handlers
  83. //
  84. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  85. void
  86. CHeaderDlg::OnChangeEditHeader()
  87. /*++
  88. Routine Description:
  89. change edit handler
  90. Arguments:
  91. None
  92. Return Value:
  93. None
  94. --*/
  95. {
  96. m_button_Ok.EnableWindow(m_edit_Header.GetWindowTextLength() > 0);
  97. }
  98. BOOL
  99. CHeaderDlg::OnInitDialog()
  100. /*++
  101. Routine Description:
  102. WM_INITDIALOG handler. Initialize the dialog.
  103. Arguments:
  104. None.
  105. Return Value:
  106. TRUE if focus is to be set automatically, FALSE if the focus
  107. is already set.
  108. --*/
  109. {
  110. CDialog::OnInitDialog();
  111. OnChangeEditHeader();
  112. return TRUE;
  113. }