?? +
字號:
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 + -