GME
13
|
00001 #if !defined(AFX_PARTBROWSERCTRL_H__6E43458B_2522_4805_9C82_4ABE0A87F7BC__INCLUDED_) 00002 #define AFX_PARTBROWSERCTRL_H__6E43458B_2522_4805_9C82_4ABE0A87F7BC__INCLUDED_ 00003 00004 00005 #if _MSC_VER > 1000 00006 #pragma once 00007 #endif // _MSC_VER > 1000 00008 00009 00010 #include "PartBrowserDlg.h" 00011 #include "..\GMEActiveBrowser\MgaObjectEventList.h" 00012 00013 // PartBrowserCtrl.h : Declaration of the CPartBrowserCtrl ActiveX Control class. 00014 00015 00016 // CPartBrowserCtrl : See PartBrowserCtrl.cpp for implementation. 00017 00018 class CPartBrowserCtrl : public COleControl 00019 { 00020 DECLARE_DYNCREATE(CPartBrowserCtrl) 00021 00022 // Constructor 00023 public: 00024 CPartBrowserCtrl(); 00025 00026 // Overrides 00027 // ClassWizard generated virtual function overrides 00028 //{{AFX_VIRTUAL(CPartBrowserCtrl) 00029 public: 00030 virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid); 00031 virtual void DoPropExchange(CPropExchange* pPX); 00032 virtual void OnResetState(); 00033 protected: 00034 virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 00035 //}}AFX_VIRTUAL 00036 00037 // Implementation 00038 protected: 00039 ~CPartBrowserCtrl(); 00040 00041 DECLARE_OLECREATE_EX(CPartBrowserCtrl) // Class factory and guid 00042 DECLARE_OLETYPELIB(CPartBrowserCtrl) // GetTypeInfo 00043 DECLARE_PROPPAGEIDS(CPartBrowserCtrl) // Property page IDs 00044 DECLARE_OLECTLTYPE(CPartBrowserCtrl) // Type name and misc status 00045 00046 CPartBrowserDlg m_partBrowserDlg; 00047 00048 // Message maps 00049 //{{AFX_MSG(CPartBrowserCtrl) 00050 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 00051 //}}AFX_MSG 00052 DECLARE_MESSAGE_MAP() 00053 00054 // Dispatch maps 00055 //{{AFX_DISPATCH(CPartBrowserCtrl) 00056 afx_msg void SetCurrentProject(LPUNKNOWN project); 00057 afx_msg void SetMetaModel(LPUNKNOWN meta); 00058 afx_msg void SetBgColor(OLE_COLOR oleBgColor); 00059 afx_msg void ChangeAspect(LONG index); 00060 afx_msg void CycleAspect(void); 00061 afx_msg void RePaint(void); 00062 //}}AFX_DISPATCH 00063 DECLARE_DISPATCH_MAP() 00064 00065 afx_msg void AboutBox(); 00066 00067 void OnMgaObjectEvent(IMgaObject* obj, unsigned long eventmask); 00068 void OnMgaGlobalEvent(globalevent_enum event); 00069 00070 // Event maps 00071 //{{AFX_EVENT(CPartBrowserCtrl) 00072 void FireAspectChanged(LONG index) 00073 {FireEvent(eventidAspectChanged, EVENT_PARAM(VTS_I4), index); } 00074 //}}AFX_EVENT 00075 DECLARE_EVENT_MAP() 00076 00077 // Native COM interfaces - peter 00078 DECLARE_INTERFACE_MAP() 00079 00080 BEGIN_INTERFACE_PART(EventSink, IMgaEventSink) 00081 STDMETHOD(GlobalEvent(globalevent_enum event)); 00082 STDMETHOD(ObjectEvent(IMgaObject* obj, unsigned long eventmask, VARIANT v)); 00083 END_INTERFACE_PART(EventSink) 00084 00085 // Dispatch and event IDs 00086 public: 00087 enum { 00088 //{{AFX_DISP_ID(CPartBrowserCtrl) 00089 dispidCycleAspect = 5L, 00090 dispidChangeAspect = 4L, 00091 dispidRePaint = 6L, 00092 dispidSetBgColor = 3L, 00093 dispidSetCurrentProject = 1L, 00094 dispidSetMetaModel = 2L, 00095 eventidAspectChanged = 1L 00096 //}}AFX_DISP_ID 00097 }; 00098 00099 void SendAspectChanged(LONG index); 00100 00101 protected: 00102 CMgaObjectEventList m_MgaObjectEventList; 00103 void PropagateMgaMessages(); 00104 }; 00105 00106 //{{AFX_INSERT_LOCATION}} 00107 // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 00108 00109 #endif // !defined(AFX_PARTBROWSERCTRL_H__6E43458B_2522_4805_9C82_4ABE0A87F7BC__INCLUDED_)