正文

主窗体设计(27)

Visual C++项目开发案例全程实录(第2版) 作者:明日科技


 

为各个按钮添加进行云台控制的方法。代码如下:

void CCaptureDlg::OnUp() //向上移动

{

MoveCapture(0);

}

void CCaptureDlg::OnReset() //停止移动

{

MoveCapture(12);

}

void CCaptureDlg::OnDown() //向下移动

{

MoveCapture(1);

}

void CCaptureDlg::OnLeft() //向左移动

{

MoveCapture(2);

}

void CCaptureDlg::OnRight() //向右移动

{

MoveCapture(3);

}

void CCaptureDlg::OnInFoci() //增加聚焦

{

MoveCapture(5);

}

void CCaptureDlg::OnReFoci() //减小聚焦

{

MoveCapture(4);

}

void CCaptureDlg::OnInLen() //对焦增

{

MoveCapture(7);

}

void CCaptureDlg::OnReLen() //对焦减

{

MoveCapture(6);

}

void CCaptureDlg::OnReAperture() //光圈减

{

MoveCapture(8);

}

void CCaptureDlg::OnInAperture() //光圈增

{

MoveCapture(9);

}

void CCaptureDlg::OnReBrush() //画笔减

{

MoveCapture(10);

}

void CCaptureDlg::OnInBrush() //画笔增

{

MoveCapture(11);

}


上一章目录下一章

Copyright © 读书网 www.dushu.com 2005-2020, All Rights Reserved.
鄂ICP备15019699号 鄂公网安备 42010302001612号