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.

104 lines
2.7 KiB

  1. // ftpadvp1.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ISAdmin.h"
  5. #include "ftpadvp1.h"
  6. #ifdef _DEBUG
  7. #undef THIS_FILE
  8. static char BASED_CODE THIS_FILE[] = __FILE__;
  9. #endif
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CFTPADVP1 dialog
  12. IMPLEMENT_DYNCREATE(CFTPADVP1, CGenPage)
  13. CFTPADVP1::CFTPADVP1() : CGenPage(CFTPADVP1::IDD)
  14. {
  15. //{{AFX_DATA_INIT(CFTPADVP1)
  16. //}}AFX_DATA_INIT
  17. }
  18. CFTPADVP1::~CFTPADVP1()
  19. {
  20. }
  21. void CFTPADVP1::DoDataExchange(CDataExchange* pDX)
  22. {
  23. CGenPage::DoDataExchange(pDX);
  24. //{{AFX_DATA_MAP(CFTPADVP1)
  25. DDX_Control(pDX, IDC_FTPDBGFLAGSDATA1, m_editFTPDbgFlags);
  26. DDX_TexttoHex(pDX, IDC_FTPDBGFLAGSDATA1, m_ulFTPDbgFlags);
  27. //}}AFX_DATA_MAP
  28. }
  29. BEGIN_MESSAGE_MAP(CFTPADVP1, CGenPage)
  30. //{{AFX_MSG_MAP(CFTPADVP1)
  31. ON_EN_CHANGE(IDC_FTPDBGFLAGSDATA1, OnChangeFtpdbgflagsdata1)
  32. //}}AFX_MSG_MAP
  33. END_MESSAGE_MAP()
  34. /////////////////////////////////////////////////////////////////////////////
  35. // CFTPADVP1 message handlers
  36. BOOL CFTPADVP1::OnInitDialog()
  37. {
  38. int i;
  39. CGenPage::OnInitDialog();
  40. // TODO: Add extra initialization here
  41. for (i = 0; i < AdvFTPPage_TotalNumRegEntries; i++) {
  42. m_binNumericRegistryEntries[i].bIsChanged = FALSE;
  43. m_binNumericRegistryEntries[i].ulMultipleFactor = 1;
  44. }
  45. m_binNumericRegistryEntries[AdvFTPPage_DebugFlags].strFieldName = _T(DEBUGFLAGSNAME);
  46. m_binNumericRegistryEntries[AdvFTPPage_DebugFlags].ulDefaultValue = DEFAULTDEBUGFLAGS;
  47. for (i = 0; i < AdvFTPPage_TotalNumRegEntries; i++) {
  48. if (m_rkMainKey->QueryValue(m_binNumericRegistryEntries[i].strFieldName,
  49. m_binNumericRegistryEntries[i].ulFieldValue) != ERROR_SUCCESS) {
  50. m_binNumericRegistryEntries[i].ulFieldValue = m_binNumericRegistryEntries[i].ulDefaultValue;
  51. }
  52. }
  53. m_editFTPDbgFlags.LimitText(8);
  54. m_ulFTPDbgFlags = m_binNumericRegistryEntries[AdvFTPPage_DebugFlags].ulFieldValue;
  55. UpdateData(FALSE); // Force Edit box(es) to pick up value(s)
  56. m_bSetChanged = TRUE; // Any more changes come from the user
  57. return TRUE; // return TRUE unless you set the focus to a control
  58. // EXCEPTION: OCX Property Pages should return FALSE
  59. }
  60. void CFTPADVP1::OnChangeFtpdbgflagsdata1()
  61. {
  62. // TODO: Add your control notification handler code here
  63. if (m_bSetChanged) {
  64. m_binNumericRegistryEntries[AdvFTPPage_DebugFlags].bIsChanged = TRUE;
  65. m_bIsDirty = TRUE;
  66. SetModified(TRUE);
  67. }
  68. }
  69. void CFTPADVP1::SaveInfo()
  70. {
  71. if (m_bIsDirty) {
  72. m_binNumericRegistryEntries[AdvFTPPage_DebugFlags].ulFieldValue = m_ulFTPDbgFlags;
  73. SaveNumericInfo(m_binNumericRegistryEntries, AdvFTPPage_TotalNumRegEntries);
  74. }
  75. CGenPage::SaveInfo();
  76. }