#include "..\\global\\iviewer.h"
#include "afxwin.h"
class CFrmWnd;

class CViewer : public IViewer
{
private:
	LONG m_refcount;
	LPVIEWERDATA m_pData;
	
	DWORD m_dwLayer;
	
public:
	CFrmWnd *m_pFrmWnd;
	CDocument *m_pDocument;
	CWnd* m_pWndMain;

	CViewer();
	virtual ~CViewer();

	static HRESULT CreateInstance(REFIID riid, void **ppv);

	STDMETHODIMP QueryInterface(const IID &riid, void **ppvObject);
	STDMETHODIMP_(ULONG) AddRef(void);
	STDMETHODIMP_(ULONG) Release(void);

	STDMETHODIMP SetData(LPVIEWERDATA pData);
	STDMETHODIMP ShowViewer(CDocument *pDocument, CWnd* pMainWnd);
	STDMETHODIMP Refresh(DWORD dwType);
	STDMETHODIMP GetName(CString &rstrName);
	STDMETHODIMP GetDescription(CString &rstrDescription);

};