#pragma once
#include <windows.h>

typedef struct
{
	DWORD dwLayers;					// pocet vrstev
	void** ppData;					// data v jednotlivych vrstvach
	LPDWORD dwDataLenArray;			// delka dat v jednotlivych vrstvach
}VIEWERDATA, *LPVIEWERDATA;

// {08F629D2-BBA3-44a2-81DE-B86DFB49A00C}
static const GUID IID_IViewer = 
{ 0x8f629d2, 0xbba3, 0x44a2, { 0x81, 0xde, 0xb8, 0x6d, 0xfb, 0x49, 0xa0, 0xc } };

#define WM_VIEWERCLOSED		WM_USER + 6

#ifndef __DEFCREATEPROC__
#define __DEFCREATEPROC__
typedef HRESULT (WINAPIV *CREATEPROC)(REFIID riid, void **ppv);
#endif

#define REFRESHTYPE_TRIGGER			0x01
#define REFRESHTYPE_AUTOTRIGGER		0x02

class IViewer : public IUnknown
{
public:
	virtual STDMETHODIMP SetData(LPVIEWERDATA pData) = 0;
	virtual STDMETHODIMP ShowViewer(CDocument* pDocument, CWnd* pMainWnd) = 0;
	virtual STDMETHODIMP Refresh(DWORD dwType) = 0;
	virtual STDMETHODIMP GetName(CString &rstrName) = 0;
	virtual STDMETHODIMP GetDescription(CString &rstrDescription) = 0;
};