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.2 KiB

  1. /*--------------------------------------------------------------------------*
  2. *
  3. * Microsoft Windows
  4. * Copyright (C) Microsoft Corporation, 1992 - 1999
  5. *
  6. * File: ocxview.h
  7. *
  8. * Contents: Interface file for COCXHostView
  9. *
  10. * History: 12-Dec-97 JeffRo Created
  11. *
  12. *--------------------------------------------------------------------------*/
  13. #if !defined(AFX_OCXVIEW_H__B320948E_731E_11D1_8033_0000F875A9CE__INCLUDED_)
  14. #define AFX_OCXVIEW_H__B320948E_731E_11D1_8033_0000F875A9CE__INCLUDED_
  15. #if _MSC_VER >= 1000
  16. #pragma once
  17. #endif // _MSC_VER >= 1000
  18. // ocxview.h : header file
  19. //
  20. #ifdef DBG
  21. extern CTraceTag tagOCXActivation;
  22. #endif
  23. /////////////////////////////////////////////////////////////////////////////
  24. // COCXHostView view
  25. class COCXHostView : public CView,
  26. public CEventSource<COCXHostActivationObserver>
  27. {
  28. typedef CView BC;
  29. public:
  30. COCXHostView(); // protected constructor used by dynamic creation
  31. DECLARE_DYNCREATE(COCXHostView)
  32. // Attributes
  33. private:
  34. CAMCView * m_pAMCView;
  35. IUnknownPtr m_spUnkCtrlWrapper;
  36. protected:
  37. virtual CMMCAxWindow * GetAxWindow(); // can be overridden.
  38. CAMCView * GetAMCView();
  39. // Attributes
  40. public:
  41. CFont m_font;
  42. // Operations
  43. public:
  44. // Overrides
  45. // ClassWizard generated virtual function overrides
  46. //{{AFX_VIRTUAL(COCXHostView)
  47. protected:
  48. virtual void OnDraw(CDC* pDC); // overridden to draw this view
  49. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  50. virtual BOOL OnCmdMsg( UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo );
  51. //}}AFX_VIRTUAL
  52. // Implementation
  53. public:
  54. virtual ~COCXHostView();
  55. void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
  56. virtual LPUNKNOWN GetIUnknown();
  57. virtual BOOL PreTranslateMessage(MSG* pMsg);
  58. SC ScSetControl(HNODE hNode, CResultViewType& rvt, INodeCallback *pNodeCallback);
  59. private:
  60. SC ScSetControl1(HNODE hNode, LPUNKNOWN pUnkCtrl, DWORD dwOCXOptions, INodeCallback *pNodeCallback);
  61. SC ScSetControl2(HNODE hNode, LPCWSTR szOCXClsid, DWORD dwOCXOptions, INodeCallback *pNodeCallback);
  62. typedef CMMCAxWindow *PMMCAXWINDOW;
  63. SC ScCreateAxWindow(PMMCAXWINDOW &pWndAx); // creates a new CMMCAxWindow
  64. SC ScHideWindow();
  65. protected:
  66. #ifdef _DEBUG
  67. virtual void AssertValid() const;
  68. virtual void Dump(CDumpContext& dc) const;
  69. #endif
  70. // Generated message map functions
  71. protected:
  72. //{{AFX_MSG(COCXHostView)
  73. afx_msg void OnSize(UINT nType, int cx, int cy);
  74. afx_msg void OnSetFocus(CWnd* pOldWnd);
  75. afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
  76. afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
  77. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  78. afx_msg void OnDestroy();
  79. //}}AFX_MSG
  80. DECLARE_MESSAGE_MAP()
  81. private:
  82. void SetAmbientFont (IAxWinAmbientDispatch* pHostDispatch);
  83. };
  84. /////////////////////////////////////////////////////////////////////////////
  85. //{{AFX_INSERT_LOCATION}}
  86. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  87. #endif // !defined(AFX_OCXVIEW_H__B320948E_731E_11D1_8033_0000F875A9CE__INCLUDED_)