Source code of Windows XP (NT5)
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.

74 lines
1.7 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 **/
  4. /**********************************************************************/
  5. /*
  6. ACS.h
  7. Defines Common Stuff to ACS
  8. FILE HISTORY:
  9. 11/12/97 Wei Jiang Created
  10. */
  11. #include "stdafx.h"
  12. #include "acshand.h"
  13. #include "acs.h"
  14. ///////////////////////////////////////////////////////////////////////////////
  15. // ACS Common Dialogs
  16. IMPLEMENT_DYNCREATE(CACSDialog, CHelpDialog)
  17. BEGIN_MESSAGE_MAP(CACSDialog, CHelpDialog)
  18. //{{AFX_MSG_MAP(CACSDialog)
  19. //}}AFX_MSG_MAP
  20. END_MESSAGE_MAP()
  21. ///////////////////////////////////////////////////////////////////////////////
  22. // ACS Common Property Pages
  23. IMPLEMENT_DYNCREATE(CACSPage, CManagedPage)
  24. BEGIN_MESSAGE_MAP(CACSPage, CManagedPage)
  25. //{{AFX_MSG_MAP(CACSPage)
  26. //}}AFX_MSG_MAP
  27. END_MESSAGE_MAP()
  28. CACSSubnetPageManager::~CACSSubnetPageManager()
  29. {
  30. m_spConfig.Release();
  31. if(m_pHandle)
  32. m_pHandle->Release();
  33. };
  34. void CACSSubnetPageManager::SetSubnetData(CACSSubnetConfig* pConfig, CACSSubnetHandle* pHandle)
  35. {
  36. ASSERT(pConfig && pHandle);
  37. m_spConfig = pConfig;
  38. m_pHandle = pHandle;
  39. if(pHandle)
  40. pHandle->AddRef();
  41. }
  42. BOOL CACSSubnetPageManager::OnApply()
  43. {
  44. if(CPageManager::OnApply())
  45. {
  46. HRESULT hr = S_OK;
  47. ASSERT((CACSSubnetConfig*)m_spConfig);
  48. hr = m_spConfig->Save(GetFlags());
  49. if FAILED(hr)
  50. ReportError(hr, IDS_ERR_SAVESUBNETCONFIG, NULL);
  51. else
  52. {
  53. // AfxMessageBox(IDS_WRN_POLICY_EFFECTIVE_FROM_NEXT_RSVP);
  54. m_pHandle->UpdateStrings();
  55. }
  56. ClearFlags();
  57. MMCNotify();
  58. return TRUE;
  59. }
  60. return FALSE;
  61. }