?? curveview.cpp
字號:
// CurveView.cpp : implementation file
//
#include "stdafx.h"
#include "Ex3_4.h"
#include "Ex3_4Doc.h"
#include "CurveView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCurveView
IMPLEMENT_DYNCREATE(CCurveView, CView)
CCurveView::CCurveView()
{
}
CCurveView::~CCurveView()
{
}
BEGIN_MESSAGE_MAP(CCurveView, CView)
//{{AFX_MSG_MAP(CCurveView)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCurveView drawing
void CCurveView::OnDraw(CDC* pDC)
{
CEx3_4Doc* pDoc = (CEx3_4Doc* )GetDocument();
// TODO: add draw code here
int cxDot,cxDotSpacing,cyDot, cxGraph,cyGraph, x,y, i;
RECT rc;
CPen pen (PS_SOLID, 0, RGB(0, 0, 255)); // red pen
// CBrush brush(RGB(255, 0, 0)); // red brush
// CBrush* pOldBrush = pDC->SelectObject(&brush);
CPen* pOldPen = pDC->SelectObject(&pen);
cxGraph = 100;
cyGraph = DATAMAX; // defined in resource.h
this->GetClientRect(&rc);
pDC->SetMapMode(MM_ANISOTROPIC);
pDC->SetWindowOrg(0, 0);
pDC->SetViewportOrg(30, rc.bottom-10);
pDC->SetWindowExt(cxGraph, cyGraph);
pDC->SetViewportExt(rc.right-20, -(rc.bottom-20));
// ┮
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -