/*********************************************************/
//	NkILSampleView.h
//		Header file of ImageSDKLibrary Sample's View class.
//
//	Copyright(c) 2007, Nikon Corporation - All rights reserved.
/*********************************************************/


#pragma once


class CNkILSampleView : public CScrollView
{
public:
// Attributes
	CNkILSampleDoc* GetDocument() const;

// Overrides
	virtual void	OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL	PreCreateWindow(CREATESTRUCT& cs);

// Implementation
	virtual ~CNkILSampleView();

	bool			PrepareImageForDisp();
	double			GetDispayRatio(){return m_dbDisplayRatio;}
	void			SetDispayRatio();
	void			DisplayAllDlg();
	void			DeleteAllDlg();
protected:
	CNkILSampleView();
	DECLARE_DYNCREATE(CNkILSampleView)

	virtual void	OnInitialUpdate(); // called first time after construct
	virtual BOOL	OnPreparePrinting(CPrintInfo* pInfo);	

	DECLARE_MESSAGE_MAP()
	
#ifdef _DEBUG
	virtual void	AssertValid() const;
	virtual void	Dump(CDumpContext& dc) const;
#endif
	afx_msg	void	OnLButtonDown( UINT nFlags, CPoint point );	
	double			m_dbDisplayRatio;
	unsigned char*	m_pBufferDisp;
	unsigned long	m_ulImageWidth;
	unsigned long	m_ulImageHeight;
};

#ifndef _DEBUG  // debug version in NkILSampleView.cpp
inline CNkILSampleDoc* CNkILSampleView::GetDocument() const
   { return reinterpret_cast<CNkILSampleDoc*>(m_pDocument); }
#endif

