// CmdWnd.h : Declaration of the CCmdWnd #ifndef __CMDWND_H_ #define __CMDWND_H_ #include "resource.h" // main symbols #include #include #include #include #include #include "..\msdevcmd\devcmd.h" ///////////////////////////////////////////////////////////////////////////// // CCmdWnd class ATL_NO_VTABLE CCmdWnd : public CComObjectRootEx, public CComCoClass, public IDispatchImpl, public IDispatchImpl, public IDSAddIn, public IDispatchImpl, public IDispatchImpl<_ICommandWindowEvents, &DIID__ICommandWindowEvents, &LIBID_devcmdLib> { public: CCmdWnd(); ~CCmdWnd(); DECLARE_REGISTRY_RESOURCEID(IDR_CMDWND) BEGIN_COM_MAP(CCmdWnd) COM_INTERFACE_ENTRY(ICmdWnd) COM_INTERFACE_ENTRY2(IDispatch, ICmdWnd) COM_INTERFACE_ENTRY(IDSAddIn) COM_INTERFACE_ENTRY(IApplicationEvents) COM_INTERFACE_ENTRY(IDebuggerEvents) COM_INTERFACE_ENTRY(_ICommandWindowEvents) END_COM_MAP() // _ICommandWindowEvents public: HRESULT _stdcall OnClose(); // IDSAddIn methods public: STDMETHOD(OnConnection)(IApplication* pApp, VARIANT_BOOL bFirstTime, long dwCookie, VARIANT_BOOL* bOnConnection); STDMETHOD(OnDisconnection)(VARIANT_BOOL bLastTime); // IApplicationEvents methods public: STDMETHOD(BeforeBuildStart)(); STDMETHOD(BuildFinish)(long nNumErrors, long nNumWarnings); STDMETHOD(BeforeApplicationShutDown)(); STDMETHOD(DocumentOpen)(IDispatch *pDocument); STDMETHOD(BeforeDocumentClose)(IDispatch *pDocument); STDMETHOD(DocumentSave)(IDispatch *pDocument); STDMETHOD(NewDocument)(IDispatch *pDocument); STDMETHOD(WindowActivate)(IDispatch *pWindow); STDMETHOD(WindowDeactivate)(IDispatch *pWindow); STDMETHOD(WorkspaceOpen)(); STDMETHOD(WorkspaceClose)(); STDMETHOD(NewWorkspace)(); // IDebuggerEvents method public: STDMETHOD(BreakpointHit)(IDispatch *pBreakpoint); // ICmdWnd public: STDMETHOD(DoCmdWnd)(); protected: CComPtr m_spApplication; DWORD m_dwAddInID; DWORD m_dwAppEvents; DWORD m_dwDbgEvents; CComPtr m_pCommandWindow; DWORD m_dwCookie; }; #endif //__CMDWND_H_