#pragma once

#include "..\\global\\iviewer.h"

class CImpView;
class CViewer;

// CFrmWnd frame

class CFrmWnd : public CFrameWnd
{
	DECLARE_DYNCREATE(CFrmWnd)
public:
	virtual ~CFrmWnd();
protected:
	CFrmWnd();           // protected constructor used by dynamic creation

protected:
	DECLARE_MESSAGE_MAP()
public:
	CImpView *m_pWndDrawArea;
	CViewer* m_pViewerPtr;
	DWORD m_dwOldLayerCount;
	DWORD m_dwLayer;
	LPVIEWERDATA m_pData;
	HACCEL m_hAccel;
	BOOL m_bUpdateTrigger;
	BOOL m_bUpdateAutoTrigger;
protected:
	virtual void PostNcDestroy();
public:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnUpdateRefreshNow(CCmdUI *pCmdUI);
	afx_msg void OnCommandUser(UINT nId);

	void Update(DWORD dwType);
	void UpdateMenu();
	afx_msg void OnLayerNext();
	afx_msg void OnUpdateLayerNext(CCmdUI *pCmdUI);
	afx_msg void OnLayerPrevious();
	afx_msg void OnUpdateLayerPrevious(CCmdUI *pCmdUI);
	virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
	virtual BOOL OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult);
public:
	afx_msg void OnRefreshNow();
	afx_msg void OnRefreshOnautotrigger();
//	afx_msg void OnUpdateRefreshOnautotrigger(CCmdUI *pCmdUI);
	afx_msg void OnRefreshOntrigger();
//	afx_msg void OnUpdateRefreshOntrigger(CCmdUI *pCmdUI);
};


