📄 sidestartnodedlg.cpp
字号:
// SideStartnodeDlg.cpp : implementation file
//
#include "stdafx.h"
#include "paintobj.h"
#include "SideStartnodeDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSideStartnodeDlg dialog
CSideStartnodeDlg::CSideStartnodeDlg(CWnd* pParent /*=NULL*/)
: CDialog(CSideStartnodeDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CSideStartnodeDlg)
m_dStartx = 0.0;
m_dStarty = 0.0;
m_nMode = 0;
m_dAngle = 0.0;
//}}AFX_DATA_INIT
}
void CSideStartnodeDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSideStartnodeDlg)
DDX_Control(pDX, IDC_ANGLE, m_ctlAngle);
DDX_Control(pDX, IDC_STARTY, m_ctlStarty);
DDX_Control(pDX, IDC_STARTX, m_ctlStartx);
DDX_Text(pDX, IDC_STARTX, m_dStartx);
DDX_Text(pDX, IDC_STARTY, m_dStarty);
DDX_Radio(pDX, IDC_RADIO1, m_nMode);
DDX_Text(pDX, IDC_ANGLE, m_dAngle);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSideStartnodeDlg, CDialog)
//{{AFX_MSG_MAP(CSideStartnodeDlg)
ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSideStartnodeDlg message handlers
BOOL CSideStartnodeDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_ctlAngle.EnableWindow(FALSE);
if (m_nParameter == 1)
{
m_ctlStartx.EnableWindow(FALSE);
m_ctlStarty.EnableWindow(FALSE);
}
else
{
m_ctlStartx.EnableWindow(TRUE);
m_ctlStarty.EnableWindow(TRUE);
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CSideStartnodeDlg::OnRadio1()
{
// TODO: Add your control notification handler code here
m_nMode=0;
m_dAngle = 0.0;
UpdateData(FALSE);
m_ctlAngle.EnableWindow(FALSE);
}
void CSideStartnodeDlg::OnRadio2()
{
// TODO: Add your control notification handler code here
m_nMode=1;
m_ctlAngle.EnableWindow(TRUE);
}
int CSideStartnodeDlg::DoModal(int nParameter)
{
// TODO: Add your specialized code here and/or call the base class
m_nParameter = nParameter;
return CDialog::DoModal();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -