speeds.cpp

来自「机械手IPC控制器伺服运动程序」· C++ 代码 · 共 65 行

CPP
65
字号
// SpeedS.cpp : implementation file
//

#include "stdafx.h"
#include "alfa.h"
#include "SpeedS.h"
#include "TeachMode.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSpeedS dialog


CSpeedS::CSpeedS(CWnd* pParent /*=NULL*/)
	: CDialog(CSpeedS::IDD, pParent)
{
	//{{AFX_DATA_INIT(CSpeedS)
	m_speed = 0;
	//}}AFX_DATA_INIT
}


void CSpeedS::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CSpeedS)
	DDX_Control(pDX, IDC_EDIT1, m_edit);
	DDX_Text(pDX, IDC_EDIT1, m_speed);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CSpeedS, CDialog)
	//{{AFX_MSG_MAP(CSpeedS)
	ON_WM_SHOWWINDOW()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSpeedS message handlers

void CSpeedS::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CDialog::OnShowWindow(bShow, nStatus);
	
	// TODO: Add your message handler code here
	if(bShow==1)
	{
		CTeachMode * parent=(CTeachMode *)GetParent();
		if(parent->flagShow==0)
		    m_speed=10;
		else
		{
			int idx=parent->curidx;
			m_speed=parent->command[idx].acommand.para.spds;
		}
		UpdateData(FALSE);
	}
}

⌨️ 快捷键说明

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