📄 emc.cpp
字号:
// Emc.cpp : implementation file
//
#include "stdafx.h"
#include "alfa.h"
#include "Emc.h"
#include "TeachMode.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEmc dialog
CEmc::CEmc(CWnd* pParent /*=NULL*/)
: CDialog(CEmc::IDD, pParent)
{
//{{AFX_DATA_INIT(CEmc)
// NOTE: the ClassWizard will add member initialization here
m_delay = 0.0f;
//}}AFX_DATA_INIT
}
void CEmc::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CEmc)
// NOTE: the ClassWizard will add DDX and DDV calls here
DDX_Control(pDX, IDC_EDIT1, m_edit);
DDX_Text(pDX, IDC_STATIC1, m_title);
DDX_Text(pDX, IDC_EDIT1, m_delay);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CEmc, CDialog)
//{{AFX_MSG_MAP(CEmc)
// NOTE: the ClassWizard will add message map macros here
ON_WM_SHOWWINDOW()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
void CEmc::OnShowWindow(BOOL bShow, UINT nStatus)
{
CDialog::OnShowWindow(bShow, nStatus);
CString Temp_str;
// TODO: Add your message handler code here
if(bShow==1) {
CTeachMode * parent=(CTeachMode *)GetParent();
if(parent->flagShow==0) m_delay=0;
else {
int idx=parent->curidx;
m_delay=(float)parent->command[idx].pubpara.y;
}
Temp_str.Format("%6.2f", m_delay);
GetDlgItem(IDC_EDIT1)->SetWindowText(Temp_str);
// UpdateData(FALSE);
}
}
BOOL CEmc::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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -