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.

120 lines
3.7 KiB

  1. /////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2000-2001.
  5. //
  6. // File: TemplateGeneralPropertyPage.h
  7. //
  8. // Contents: Definition of CTemplateGeneralPropertyPage
  9. //
  10. //----------------------------------------------------------------------------
  11. #if !defined(AFX_TEMPLATEGeneralPROPERTYPAGE_H__C483A673_05AA_4185_8F37_5CB31AA23967__INCLUDED_)
  12. #define AFX_TEMPLATEGeneralPROPERTYPAGE_H__C483A673_05AA_4185_8F37_5CB31AA23967__INCLUDED_
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif // _MSC_VER > 1000
  16. // TemplateGeneralPropertyPage.h : header file
  17. //
  18. #include "CertTemplate.h"
  19. #include "TemplatePropertySheet.h"
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CTemplateGeneralPropertyPage dialog
  22. class CTemplateGeneralPropertyPage : public CHelpPropertyPage
  23. {
  24. // Construction
  25. public:
  26. bool m_bIsDirty;
  27. LONG_PTR m_lNotifyHandle;
  28. CTemplateGeneralPropertyPage(CCertTemplate& rCertTemplate,
  29. const CCertTmplComponentData* pCompData);
  30. virtual ~CTemplateGeneralPropertyPage();
  31. void SetAllocedSecurityInfo(LPSECURITYINFO pToBeReleased)
  32. {
  33. m_pReleaseMe = pToBeReleased;
  34. }
  35. void SetV2AuthPageNumber (int nPage)
  36. {
  37. m_nTemplateV2AuthPageNumber = nPage;
  38. }
  39. void SetV2RequestPageNumber (int nPage)
  40. {
  41. m_nTemplateV2RequestPageNumber = nPage;
  42. }
  43. // Dialog Data
  44. //{{AFX_DATA(CTemplateGeneralPropertyPage)
  45. enum { IDD = IDD_TEMPLATE_GENERAL };
  46. CComboBox m_validityUnits;
  47. CComboBox m_renewalUnits;
  48. CString m_strDisplayName;
  49. CString m_strTemplateName;
  50. //}}AFX_DATA
  51. // Overrides
  52. // ClassWizard generate virtual function overrides
  53. //{{AFX_VIRTUAL(CTemplateGeneralPropertyPage)
  54. public:
  55. virtual BOOL OnApply();
  56. virtual void OnCancel();
  57. protected:
  58. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  59. //}}AFX_VIRTUAL
  60. // Implementation
  61. protected:
  62. bool ValidateTemplateName(const CString& m_szTemplateName);
  63. int SetRenewalPeriod (int nMaxRenewalDays, bool bSilent);
  64. HRESULT EnumerateTemplates (
  65. IDirectoryObject* pTemplateContObj,
  66. const CString& szFriendlyName,
  67. bool& bFound);
  68. HRESULT FindFriendlyNameInEnterpriseTemplates (
  69. const CString& szFriendlyName,
  70. bool& bFound);
  71. virtual void DoContextHelp (HWND hWndControl);
  72. // Generated message map functions
  73. //{{AFX_MSG(CTemplateGeneralPropertyPage)
  74. afx_msg void OnChangeDisplayName();
  75. afx_msg void OnSelchangeRenewalUnits();
  76. afx_msg void OnSelchangeValidityUnits();
  77. afx_msg void OnChangeRenewalEdit();
  78. afx_msg void OnChangeValidityEdit();
  79. afx_msg void OnPublishToAd();
  80. afx_msg void OnUseADCert();
  81. afx_msg void OnChangeTemplateName();
  82. afx_msg void OnKillfocusValidityEdit();
  83. afx_msg void OnKillfocusValidityUnits();
  84. //}}AFX_MSG
  85. DECLARE_MESSAGE_MAP()
  86. virtual BOOL OnInitDialog();
  87. virtual void EnableControls ();
  88. CCertTemplate& m_rCertTemplate;
  89. private:
  90. PERIOD_TYPE m_dwCurrentRenewalUnits;
  91. PERIOD_TYPE m_dwCurrentValidityUnits;
  92. CString m_strOriginalName;
  93. CString m_strOriginalDisplayName;
  94. LPSECURITYINFO m_pReleaseMe;
  95. int m_nRenewalDays;
  96. int m_nValidityDays;
  97. const CCertTmplComponentData* m_pCompData;
  98. int m_nTemplateV2AuthPageNumber;
  99. int m_nTemplateV2RequestPageNumber;
  100. };
  101. //{{AFX_INSERT_LOCATION}}
  102. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  103. #endif // !defined(AFX_TEMPLATEGeneralPROPERTYPAGE_H__C483A673_05AA_4185_8F37_5CB31AA23967__INCLUDED_)