// RollView.cpp : implementation file
//

#include "stdafx.h"
#include "6046dryend.h"
#include "RollView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CRollView

IMPLEMENT_DYNCREATE(CRollView, CView)

CRollView::CRollView()
{
}

CRollView::~CRollView()
{
}


BEGIN_MESSAGE_MAP(CRollView, CView)
	//{{AFX_MSG_MAP(CRollView)
	ON_WM_CREATE()
	ON_WM_PAINT()
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CRollView drawing

void CRollView::OnDraw(CDC* pDC)
{
	CDocument* pDoc = GetDocument();
	// TODO: add draw code here
}

/////////////////////////////////////////////////////////////////////////////
// CRollView diagnostics

#ifdef _DEBUG
void CRollView::AssertValid() const
{
	CView::AssertValid();
}

void CRollView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CRollView message handlers

int CRollView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CView::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	m_RollCtrl = &((CMy6046DryEndApp*)AfxGetApp())->m_TimeSeries1;

	CRect tmp;
	this->GetClientRect(&tmp);
	m_RollCtrl->InitCtrl(this,this, 0);
	
	return 0;
}

void CRollView::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	CRect tmp;
	GetClientRect(tmp);
	m_RollCtrl->Resize(tmp);	
}

void CRollView::OnSize(UINT nType, int cx, int cy) 
{
	CView::OnSize(nType, cx, cy);

}
