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.

170 lines
2.3 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 "w3scfg.h"
  18. #include "hdrdlg.h"
  19. #ifdef _DEBUG
  20. #define new DEBUG_NEW
  21. #undef THIS_FILE
  22. static char THIS_FILE[] = __FILE__;
  23. #endif
  24. CHeaderDlg::CHeaderDlg(
  25. IN LPCTSTR lpstrHeader,
  26. IN LPCTSTR lpstrValue,
  27. IN CWnd * pParent OPTIONAL
  28. )
  29. /*++
  30. Routine Description:
  31. Constructor for HTTP heade dialog
  32. Arguments:
  33. LPCTSTR lpstrHeader : Header string
  34. LPCTSTR lpstrValue : Value string
  35. CWnd * pParent : Parent window
  36. Return Value:
  37. None
  38. --*/
  39. : CDialog(CHeaderDlg::IDD, pParent)
  40. {
  41. //{{AFX_DATA_INIT(CHeaderDlg)
  42. m_strHeader = lpstrHeader ? lpstrHeader : _T("");
  43. m_strValue = lpstrValue ? lpstrValue : _T("");
  44. //}}AFX_DATA_INIT
  45. }
  46. void
  47. CHeaderDlg::DoDataExchange(
  48. IN CDataExchange * pDX
  49. )
  50. /*++
  51. Routine Description:
  52. Initialise/Store control data
  53. Arguments:
  54. CDataExchange * pDX - DDX/DDV control structure
  55. Return Value:
  56. None
  57. --*/
  58. {
  59. CDialog::DoDataExchange(pDX);
  60. //{{AFX_DATA_MAP(CHeaderDlg)
  61. DDX_Control(pDX, IDC_EDIT_HEADER, m_edit_Header);
  62. DDX_Control(pDX, IDOK, m_button_Ok);
  63. DDX_Text(pDX, IDC_EDIT_HEADER, m_strHeader);
  64. DDX_Text(pDX, IDC_EDIT_VALUE, m_strValue);
  65. //}}AFX_DATA_MAP
  66. }
  67. //
  68. // Message Map
  69. //
  70. BEGIN_MESSAGE_MAP(CHeaderDlg, CDialog)
  71. //{{AFX_MSG_MAP(CHeaderDlg)
  72. ON_EN_CHANGE(IDC_EDIT_HEADER, OnChangeEditHeader)
  73. //}}AFX_MSG_MAP
  74. END_MESSAGE_MAP()
  75. //
  76. // Message Handlers
  77. //
  78. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  79. void
  80. CHeaderDlg::OnChangeEditHeader()
  81. /*++
  82. Routine Description:
  83. change edit handler
  84. Arguments:
  85. None
  86. Return Value:
  87. None
  88. --*/
  89. {
  90. m_button_Ok.EnableWindow(m_edit_Header.GetWindowTextLength() > 0);
  91. }
  92. BOOL
  93. CHeaderDlg::OnInitDialog()
  94. /*++
  95. Routine Description:
  96. WM_INITDIALOG handler. Initialize the dialog.
  97. Arguments:
  98. None.
  99. Return Value:
  100. TRUE if focus is to be set automatically, FALSE if the focus
  101. is already set.
  102. --*/
  103. {
  104. CDialog::OnInitDialog();
  105. OnChangeEditHeader();
  106. return TRUE;
  107. }