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.

178 lines
2.7 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. DDV_MaxCharsBalloon(pDX, m_strHeader, 100);
  71. DDX_Text(pDX, IDC_EDIT_VALUE, m_strValue);
  72. DDV_MaxCharsBalloon(pDX, m_strValue, 100);
  73. //}}AFX_DATA_MAP
  74. }
  75. //
  76. // Message Map
  77. //
  78. BEGIN_MESSAGE_MAP(CHeaderDlg, CDialog)
  79. //{{AFX_MSG_MAP(CHeaderDlg)
  80. ON_EN_CHANGE(IDC_EDIT_HEADER, OnChangeEditHeader)
  81. //}}AFX_MSG_MAP
  82. END_MESSAGE_MAP()
  83. //
  84. // Message Handlers
  85. //
  86. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  87. void
  88. CHeaderDlg::OnChangeEditHeader()
  89. /*++
  90. Routine Description:
  91. change edit handler
  92. Arguments:
  93. None
  94. Return Value:
  95. None
  96. --*/
  97. {
  98. m_button_Ok.EnableWindow(m_edit_Header.GetWindowTextLength() > 0);
  99. }
  100. BOOL
  101. CHeaderDlg::OnInitDialog()
  102. /*++
  103. Routine Description:
  104. WM_INITDIALOG handler. Initialize the dialog.
  105. Arguments:
  106. None.
  107. Return Value:
  108. TRUE if focus is to be set automatically, FALSE if the focus
  109. is already set.
  110. --*/
  111. {
  112. CDialog::OnInitDialog();
  113. OnChangeEditHeader();
  114. return TRUE;
  115. }