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.

139 lines
4.6 KiB

  1. // AuthCtl.h : Declaration of the CCertAuthCtrl OLE control class.
  2. #ifndef _AuthCtl_h_12375_
  3. #define _AuthCtl_h_12375_
  4. //#include "NKChseCA.h"
  5. //#include <wincrypt.h>
  6. // #include "Certifct.h"
  7. // #include "dlgs.h"
  8. // #include "SelAcct.h"
  9. // #include "FindDlg.h"
  10. // #include "wintrust.h"
  11. //#include <cryptui.h>
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CCertAuthCtrl : See AuthCtl.cpp for implementation.
  14. class CCertAuthCtrl : public COleControl
  15. {
  16. DECLARE_DYNCREATE(CCertAuthCtrl)
  17. // Constructor
  18. public:
  19. CCertAuthCtrl();
  20. // Overrides
  21. // ClassWizard generated virtual function overrides
  22. //{{AFX_VIRTUAL(CCertAuthCtrl)
  23. public:
  24. virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
  25. virtual void DoPropExchange(CPropExchange* pPX);
  26. virtual void OnResetState();
  27. virtual void OnClick(USHORT iButton);
  28. virtual void OnFontChanged();
  29. #ifdef FUTURE_USE
  30. // tompop: some experimental code for testing
  31. virtual HRESULT LaunchCommonCTLDialog (CCTL* pCTL);
  32. #endif /* FUTURE_USE */
  33. protected:
  34. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  35. //}}AFX_VIRTUAL
  36. // Implementation
  37. protected:
  38. ~CCertAuthCtrl();
  39. DECLARE_OLECREATE_EX(CCertAuthCtrl) // Class factory and guid
  40. DECLARE_OLETYPELIB(CCertAuthCtrl) // GetTypeInfo
  41. DECLARE_PROPPAGEIDS(CCertAuthCtrl) // Property page IDs
  42. DECLARE_OLECTLTYPE(CCertAuthCtrl) // Type name and misc status
  43. // Message maps
  44. //{{AFX_MSG(CCertAuthCtrl)
  45. // NOTE - ClassWizard will add and remove member functions here.
  46. // DO NOT EDIT what you see in these blocks of generated code !
  47. //}}AFX_MSG
  48. DECLARE_MESSAGE_MAP()
  49. // Dispatch maps
  50. //{{AFX_DISPATCH(CCertAuthCtrl)
  51. afx_msg void SetMachineName(LPCTSTR szMachineName);
  52. afx_msg void SetServerInstance(LPCTSTR szServerInstance);
  53. afx_msg void DoClick(long dwButtonNumber);
  54. //}}AFX_DISPATCH
  55. DECLARE_DISPATCH_MAP()
  56. afx_msg void AboutBox();
  57. // Event maps
  58. //{{AFX_EVENT(CCertAuthCtrl)
  59. //}}AFX_EVENT
  60. DECLARE_EVENT_MAP()
  61. // Subclassed control support
  62. BOOL IsSubclassedControl();
  63. LRESULT OnOcmCommand(WPARAM wParam, LPARAM lParam);
  64. // void NKAddPageToWizard(IN ADMIN_INFO& info, IN CNKPages* nkpg2Add, IN OUT CPropertySheet* psWizard);
  65. // Dispatch and event IDs
  66. public:
  67. enum {
  68. //{{AFX_DISP_ID(CCertAuthCtrl)
  69. dispidSetMachineName = 1L,
  70. dispidSetServerInstance = 2L,
  71. //}}AFX_DISP_ID
  72. };
  73. ////////////////////////////////////////////////////////////////////////
  74. // run the dialogs used in this active X control.
  75. // Big picture: OnClick(USHORT iButton) will do all the setup for
  76. // activeX controls and then call RunDialogs4OnClick that has the
  77. // tasks of setting up the MetaBase ptr and call the _RunDialogs4OnClick
  78. // routine that does all the work...
  79. //
  80. // The above 'RunDialogs4OnClick()' calls us inside of a try/catch
  81. // block to protect the metabase
  82. ////////////////////////////////////////////////////////////////////////
  83. // BOOL RunDialogs4OnClick(USHORT iButton);
  84. ////////////////////////////////////////////////////////////////////////
  85. // _RunDialogs4OnClick -- main handler for our dialogs
  86. //
  87. // Parms: info: holds the information database for out ActiveX cntrol
  88. // By this time its member m_mbWrap holds the MetaBase Wrapper
  89. // that is properly initialized
  90. // and points to the SERVER node that we are operating in.
  91. // iButton: tells what "logical button" fired our control:
  92. // 0=Get-Cert 1=Edit
  93. ////////////////////////////////////////////////////////////////////////
  94. // BOOL _RunDialogs4OnClick(ADMIN_INFO& info, USHORT iButton);
  95. /////////////////////////////////////////////////////////////////////
  96. // Automation defined methods
  97. /////////////////////////////////////////////////////////////////////
  98. void OnAmbientPropertyChange(DISPID dispid) ;
  99. void OnTextChanged();
  100. void OnMnemonic(LPMSG pMsg);
  101. void OnGetControlInfo(LPCONTROLINFO pControlInfo);
  102. void OnKeyUpEvent(USHORT nChar, USHORT nShiftState);
  103. CString m_szServerInstance;
  104. CString m_szMachineName;
  105. BOOL m_fUpdateFont;
  106. CString m_szOurApplicationTitle; // set in OnClick()
  107. // the accelerator table
  108. HACCEL m_hAccel;
  109. WORD m_cAccel;
  110. };
  111. #endif /* _AuthCtl_h_12375_ */