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.

110 lines
2.9 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2001.
  5. //
  6. // File: Nfabpage.cpp
  7. //
  8. // Contents: WiF Policy Snapin
  9. //
  10. //
  11. // History: TaroonM
  12. // 10/30/01
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "stdafx.h"
  16. #ifdef _DEBUG
  17. #define new DEBUG_NEW
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CWirelessBasePage property page base class
  23. IMPLEMENT_DYNCREATE(CWirelessBasePage, CSnapPage)
  24. BEGIN_MESSAGE_MAP(CWirelessBasePage, CSnapPage)
  25. //{{AFX_MSG_MAP(CWirelessBasePage)
  26. ON_WM_DESTROY()
  27. //}}AFX_MSG_MAP
  28. END_MESSAGE_MAP()
  29. CWirelessBasePage::CWirelessBasePage (UINT nIDTemplate, BOOL bWiz97 /*=FALSE*/, BOOL bFinishPage /*=FALSE*/) : CWiz97BasePage(nIDTemplate, bWiz97, bFinishPage)
  30. {
  31. m_pWirelessPSData = NULL;
  32. m_pPolicyNfaOwner = NULL;
  33. m_pComponentDataImpl = NULL;
  34. }
  35. CWirelessBasePage::~CWirelessBasePage ()
  36. {
  37. if (m_pWirelessPSData != NULL)
  38. {
  39. }
  40. }
  41. void CWirelessBasePage::Initialize (PWIRELESS_PS_DATA pWirelessPSData, CComponentDataImpl* pComponentDataImpl)
  42. {
  43. // store the params
  44. m_pComponentDataImpl = pComponentDataImpl;
  45. m_pWirelessPSData = pWirelessPSData;
  46. // Initialize base class
  47. CSnapPage::Initialize( NULL);
  48. };
  49. #ifdef WIZ97WIZARDS
  50. void CWirelessBasePage::InitWiz97 (CComObject<CSecPolItem> *pSecPolItem, PWIRELESS_PS_DATA pWirelessPSData, CComponentDataImpl* pComponentDataImpl, DWORD dwFlags, DWORD dwWizButtonFlags, UINT nHeaderTitle, UINT nSubTitle)
  51. {
  52. // store the params
  53. m_pWirelessPSData = pWirelessPSData;
  54. m_pComponentDataImpl = pComponentDataImpl;
  55. // initialize baseclass
  56. CWiz97BasePage::InitWiz97 (pSecPolItem, dwFlags, dwWizButtonFlags, nHeaderTitle, nSubTitle);
  57. };
  58. #endif
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CWirelessBasePage message handlers
  61. BOOL CWirelessBasePage::OnSetActive()
  62. {
  63. // there can only be one
  64. CPropertySheet* pSheet = (CPropertySheet*) GetParent();
  65. if (GetParent())
  66. {
  67. // add context help to the style bits
  68. GetParent()->ModifyStyleEx (0, WS_EX_CONTEXTHELP, 0);
  69. }
  70. return CWiz97BasePage::OnSetActive();
  71. }
  72. ////////////////////////////////////////////////////////////////////////////
  73. // CPSPropSheetManager
  74. BOOL CPSPropSheetManager::OnApply()
  75. {
  76. BOOL bRet = TRUE;
  77. //Query each page to apply
  78. bRet = CPropertySheetManager::OnApply();
  79. //if some page refuse to apply, dont do anything
  80. if (!bRet)
  81. return bRet;
  82. HRESULT hr = S_OK;
  83. //tell the pages that the apply is done
  84. NotifyManagerApplied();
  85. return bRet;
  86. }
  87.