upsass.cpp
来自「机械手IPC控制器伺服运动程序」· C++ 代码 · 共 89 行
CPP
89 行
// UpsAss.cpp : implementation file
//
#include "stdafx.h"
#include "alfa.h"
#include "UpsAss.h"
#include "Main.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CUpsAss dialog
CUpsAss::CUpsAss(CWnd* pParent /*=NULL*/)
: CDialog(CUpsAss::IDD, pParent)
{
//{{AFX_DATA_INIT(CUpsAss)
m_edt = 10;
//}}AFX_DATA_INIT
}
void CUpsAss::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CUpsAss)
DDX_Control(pDX, IDC_EDIT1, m_edit);
DDX_Text(pDX, IDC_EDIT1, m_edt);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CUpsAss, CDialog)
//{{AFX_MSG_MAP(CUpsAss)
ON_WM_SHOWWINDOW()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CUpsAss message handlers
void CUpsAss::OnShowWindow(BOOL bShow, UINT nStatus)
{
CDialog::OnShowWindow(bShow, nStatus);
// TODO: Add your message handler code here
if(bShow==1)
{
CMain * main=(CMain *)GetParent();
m_edt=main->dlgfixedmode->moveparam.speed_up_ass;
UpdateData(FALSE);
main->dlgcur=this;
}
}
void CUpsAss::OnOK()
{
// TODO: Add extra validation here
CMain * main=(CMain *)GetParent();
UpdateData();
main->dlgfixedmode->moveparam.speed_up_ass=m_edt;
ShowWindow(FALSE);
main->dlgfixedmode->ShowWindow(TRUE);
}
void CUpsAss::OnCancel()
{
// TODO: Add extra cleanup here
CMain * main=(CMain *)GetParent();
ShowWindow(FALSE);
main->dlgfixedmode->ShowWindow(TRUE);
}
BOOL CUpsAss::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
h_SkinDialog.SubClassDialog(m_hWnd);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?