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