📄 +
字号:
void CPMovl::OnExecute() //直线脉冲式运动方式
{
//TODO:Add your control notification handler code here
dlg.OnOpenCom(); //设置端口参数,建立机器人和计算机的连接;
...
if (m_nvType == 0)
//速度类型为0时对Cstring类型的参数进行转换
{
type = (char*)a.operator LPCTSTR();
}
else
//速度类型为1时对Cstring类型的参数进行转换
{
type = (char*)b.operator LPCTSTR();
}
rc = BscPMovl(dlg.Handle, type, Velocity, ToolNo, p); //直线脉冲式函数
...
dlg.CloseCom(); //断开串口连接,释放函数句柄;
}
...
BOOL CPMovl::OnInitDialog() //直线脉冲式运动方式类的初始化
{
CDialog::OnInitDialog();
//TODO:Add extra initialization here
a = 'V';
b = 'V';
b += 'R';
m_nVeloType.AddString(_T("0:V(Control point"));
m_nVeloType.AddString(_T("1:VR(Position angular"));
m_nVeloType.SetCurSel(m_nvType);
...
return TRUE; //return TRUE unless you set the focus to a control
//EXCEPTION:OCX Property Pages should return FALSE
}
CMovj::CMovj(CWnd *pParent /*=NULL*/): CDialog(CMovj::IDD, pParent)
{
...
m_nframename = 0; //设置列表返回值初始值为0;
m_nformD0 = 0; //设置各列表项初始值为0;
m_nformD1 = 0;
m_nformD2 = 0;
...
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -