speed.cpp

来自「步进伺服电机运动控制,k880伺服电机运动控制vc程序」· C++ 代码 · 共 81 行

CPP
81
字号
// speed.cpp : implementation file
//

#include "stdafx.h"
#include "test880.h"
#include "speed.h"
#include "songyun.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//int m_timer2;
/////////////////////////////////////////////////////////////////////////////
// Cspeed dialog


Cspeed::Cspeed(CWnd* pParent /*=NULL*/)
	: CDialog(Cspeed::IDD, pParent)
{
	//{{AFX_DATA_INIT(Cspeed)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void Cspeed::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(Cspeed)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(Cspeed, CDialog)
	//{{AFX_MSG_MAP(Cspeed)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// Cspeed message handlers





BOOL Cspeed::OnInitDialog() 
{
	CDialog::OnInitDialog();
	POINT p;
	p.x=50;
	p.y=350;
	zbt.origin=p;
	zbt.xmax=620;
	zbt.ymax=320;
	zbt.xkd=23;
	zbt.ykd=15;
    //m_timer2=SetTimer(1,100,0);
	// TODO: Add extra initialization here
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void Cspeed::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	dc.SetBkMode(TRANSPARENT);
	dc.TextOut(245,20,"单个轴的速度曲线图");
	zbt.pxy(&dc);
	zbt.pkd(&dc);
	zbt.pkdz(&dc);
	zbt.psd(&dc);
	// TODO: Add your message handler code here
	
	// Do not call CDialog::OnPaint() for painting messages
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?