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.

89 lines
2.1 KiB

  1. // genpage.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ISAdmin.h"
  5. #include "genpage.h"
  6. #include "afximpl.h"
  7. #include "afxpriv.h"
  8. #ifdef _DEBUG
  9. #undef THIS_FILE
  10. static char BASED_CODE THIS_FILE[] = __FILE__;
  11. #endif
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CGenPage property page
  14. IMPLEMENT_DYNAMIC(CGenPage, CPropertyPage)
  15. //CGenPage::CGenPage() : CPropertyPage(CGenPage::IDD)
  16. CGenPage::CGenPage(UINT nIDTemplate, UINT nIDCaption):CPropertyPage( nIDTemplate, nIDCaption )
  17. {
  18. m_bSetChanged = FALSE; //Do not mark vaues as changed during initialization
  19. m_bIsDirty = FALSE;
  20. };
  21. CGenPage::CGenPage(LPCTSTR lpszTemplateName, UINT nIDCaption): CPropertyPage(lpszTemplateName, nIDCaption)
  22. {
  23. m_bSetChanged = FALSE; //Do not mark vaues as changed during initialization
  24. m_bIsDirty = FALSE;
  25. };
  26. CGenPage::~CGenPage()
  27. {
  28. }
  29. void CGenPage::DoDataExchange(CDataExchange* pDX)
  30. {
  31. CPropertyPage::DoDataExchange(pDX);
  32. //{{AFX_DATA_MAP(CGenPage)
  33. // NOTE: the ClassWizard will add DDX and DDV calls here
  34. //}}AFX_DATA_MAP
  35. }
  36. BEGIN_MESSAGE_MAP(CGenPage, CPropertyPage)
  37. //{{AFX_MSG_MAP(CGenPage)
  38. // NOTE: the ClassWizard will add message map macros here
  39. //}}AFX_MSG_MAP
  40. END_MESSAGE_MAP()
  41. /////////////////////////////////////////////////////////////////////////////
  42. // CGenPage message handlers
  43. void CGenPage::SaveInfo()
  44. {
  45. if (m_bIsDirty) {
  46. m_bIsDirty = FALSE;
  47. SetModified(FALSE);
  48. }
  49. }
  50. void CGenPage::SaveNumericInfo(PNUM_REG_ENTRY lpbinNumEntries, int iNumEntries)
  51. {
  52. int i;
  53. for (i = 0; i < iNumEntries; i++) {
  54. if (lpbinNumEntries[i].bIsChanged) {
  55. lpbinNumEntries[i].bIsChanged = FALSE;
  56. m_rkMainKey->SetValue(lpbinNumEntries[i].strFieldName, lpbinNumEntries[i].ulFieldValue);
  57. }
  58. }
  59. }
  60. void CGenPage::SaveStringInfo(PSTRING_REG_ENTRY lpbinStringEntries, int iStringEntries)
  61. {
  62. int i;
  63. for (i = 0; i < iStringEntries; i++) {
  64. if (lpbinStringEntries[i].bIsChanged) {
  65. lpbinStringEntries[i].bIsChanged = FALSE;
  66. m_rkMainKey->SetValue(lpbinStringEntries[i].strFieldName, lpbinStringEntries[i].strFieldValue);
  67. }
  68. }
  69. }