#if !defined(AFX_VCTREECTL_H)
#define AFX_VCTREECTL_H
////////////////////////////////////////////////////////////////////////////////
//
//   ActiveX Control-
//   -  
// <VCTree.h>
//
////////////////////////////////////////////////////////////////////////////////
#include "TreeDlg.h"

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// VCTreeCtl.h : Declaration of the CVCTreeCtrl ActiveX Control class.

/////////////////////////////////////////////////////////////////////////////
// CVCTreeCtrl : See VCTreeCtl.cpp for implementation.
/////////////////////////////////////////////////////////////////////////////
class CVCTreeCtrl : public COleControl
{
	DECLARE_DYNCREATE(CVCTreeCtrl)
  TreeDlg  m_TreeDlg;  //   
// Constructor
public:
	CVCTreeCtrl();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CVCTreeCtrl)
	public:
	virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
	virtual void DoPropExchange(CPropExchange* pPX);
	virtual void OnResetState();
	//}}AFX_VIRTUAL
// Implementation
protected:
	~CVCTreeCtrl();

	DECLARE_OLECREATE_EX(CVCTreeCtrl)    // Class factory and guid
	DECLARE_OLETYPELIB(CVCTreeCtrl)      // GetTypeInfo
	DECLARE_PROPPAGEIDS(CVCTreeCtrl)     // Property page IDs
	DECLARE_OLECTLTYPE(CVCTreeCtrl)		// Type name and misc status

// Message maps
	//{{AFX_MSG(CVCTreeCtrl)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSetFocus(CWnd* pOldWnd);
	//}}AFX_MSG
  void OnUpdateContextMenuCommand ( CCmdUI * pCmdUI );
	DECLARE_MESSAGE_MAP()

// Dispatch maps
	//{{AFX_DISPATCH(CVCTreeCtrl)
	afx_msg LPDISPATCH GetTree();
	afx_msg LPDISPATCH CreateImageList();
	afx_msg LPDISPATCH GetToolBar();
	afx_msg void SetContextMenu(long val);
  afx_msg void _Invalidate(); 
	//}}AFX_DISPATCH
	DECLARE_DISPATCH_MAP()
public:
// Event maps
	//{{AFX_EVENT(CVCTreeCtrl)
	void FireMenuCommand(long Id)
		{FireEvent(eventidMenuCommand,EVENT_PARAM(VTS_I4), Id);}
	//}}AFX_EVENT
	DECLARE_EVENT_MAP()
// Dispatch and event IDs
public:
	enum {
	//{{AFX_DISP_ID(CVCTreeCtrl)
	dispidGetTree = 1L,
	dispidCreateImageList = 2L,
	dispidGetToolBar = 3L,
	dispidSetContextMenu = 4L,
	eventidMenuCommand = 1L,
	//}}AFX_DISP_ID
	};
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_VCTREECTL_H)
