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.

112 lines
3.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997-2001.
  5. //
  6. // File: SnapMgr.h
  7. //
  8. // Contents: header file for Snapin Manager property page
  9. //
  10. //----------------------------------------------------------------------------
  11. #ifndef __SNAPMGR_H__
  12. #define __SNAPMGR_H__
  13. #endif // ~__SNAPMGR_H__
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CCertMgrChooseMachinePropPage dialog
  16. class CCertMgrChooseMachinePropPage : public CChooseMachinePropPage
  17. {
  18. // Construction
  19. public:
  20. CCertMgrChooseMachinePropPage();
  21. virtual ~CCertMgrChooseMachinePropPage();
  22. void AssignLocationPtr (DWORD* pdwLocation);
  23. // Dialog Data
  24. //{{AFX_DATA(CCertMgrChooseMachinePropPage)
  25. // NOTE - ClassWizard will add data members here.
  26. // DO NOT EDIT what you see in these blocks of generated code !
  27. //}}AFX_DATA
  28. // Overrides
  29. // ClassWizard generate virtual function overrides
  30. //{{AFX_VIRTUAL(CCertMgrChooseMachinePropPage)
  31. public:
  32. virtual BOOL OnSetActive();
  33. protected:
  34. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  35. //}}AFX_VIRTUAL
  36. // Implementation
  37. protected:
  38. // Generated message map functions
  39. //{{AFX_MSG(CCertMgrChooseMachinePropPage)
  40. //}}AFX_MSG
  41. DECLARE_MESSAGE_MAP()
  42. virtual LRESULT OnWizardNext();
  43. private:
  44. DWORD* m_pdwLocation;
  45. };
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CCertMgrChooseMachinePropPage property page
  48. CCertMgrChooseMachinePropPage::CCertMgrChooseMachinePropPage() :
  49. CChooseMachinePropPage(),
  50. m_pdwLocation (0)
  51. {
  52. //{{AFX_DATA_INIT(CCertMgrChooseMachinePropPage)
  53. // NOTE: the ClassWizard will add member initialization here
  54. //}}AFX_DATA_INIT
  55. }
  56. CCertMgrChooseMachinePropPage::~CCertMgrChooseMachinePropPage()
  57. {
  58. }
  59. void CCertMgrChooseMachinePropPage::AssignLocationPtr(DWORD * pdwLocation)
  60. {
  61. m_pdwLocation = pdwLocation;
  62. }
  63. void CCertMgrChooseMachinePropPage::DoDataExchange(CDataExchange* pDX)
  64. {
  65. CChooseMachinePropPage::DoDataExchange(pDX);
  66. //{{AFX_DATA_MAP(CCertMgrChooseMachinePropPage)
  67. // NOTE: the ClassWizard will add DDX and DDV calls here
  68. //}}AFX_DATA_MAP
  69. }
  70. BEGIN_MESSAGE_MAP(CCertMgrChooseMachinePropPage, CChooseMachinePropPage)
  71. //{{AFX_MSG_MAP(CCertMgrChooseMachinePropPage)
  72. //}}AFX_MSG_MAP
  73. END_MESSAGE_MAP()
  74. /////////////////////////////////////////////////////////////////////////////
  75. // CCertMgrChooseMachinePropPage message handlers
  76. BOOL CCertMgrChooseMachinePropPage::OnSetActive()
  77. {
  78. if ( m_pdwLocation && CERT_SYSTEM_STORE_SERVICES == *m_pdwLocation )
  79. GetParent ()->PostMessage (PSM_SETWIZBUTTONS, 0, PSWIZB_BACK | PSWIZB_NEXT);
  80. else
  81. GetParent ()->PostMessage (PSM_SETWIZBUTTONS, 0, PSWIZB_BACK | PSWIZB_FINISH);
  82. // Do not call CChooseMachinePropPage here because it will disable the back button.
  83. // Call the grandparent instead.
  84. return CPropertyPage::OnSetActive();
  85. }
  86. LRESULT CCertMgrChooseMachinePropPage::OnWizardNext()
  87. {
  88. UpdateData (TRUE);
  89. if ( m_pstrMachineNameOut )
  90. // Store the machine name into its output buffer
  91. *m_pstrMachineNameOut = m_strMachineName;
  92. return CChooseMachinePropPage::OnWizardNext ();
  93. }