DLG_CIRCLE.cpp
上传用户:shangwu01
上传日期:2013-04-22
资源大小:707k
文件大小:2k
- // DLG_CIRCLE.cpp : implementation file
- //
- #include "stdafx.h"
- #include "cad.h"
- #include "DLG_CIRCLE.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CDLG_CIRCLE dialog
- CDLG_CIRCLE::CDLG_CIRCLE(CWnd* pParent /*=NULL*/)
- : CDialog(CDLG_CIRCLE::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CDLG_CIRCLE)
- m_R = 0;
- m_Xsecond = 0;
- m_Ysecond = 0;
- m_select = 0;
- //}}AFX_DATA_INIT
- }
- void CDLG_CIRCLE::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CDLG_CIRCLE)
- DDX_Text(pDX, IDC_EDIT1, m_R);
- DDX_Text(pDX, IDC_EDIT2, m_Xsecond);
- DDX_Text(pDX, IDC_EDIT3, m_Ysecond);
- DDX_Radio(pDX, IDC_RADIO1, m_select);
- //}}AFX_DATA_MAP
- ((CEdit*)GetDlgItem(IDC_EDIT3))->SetReadOnly(true);
- ((CEdit*)GetDlgItem(IDC_EDIT1))->SetReadOnly(false);
- ((CEdit*)GetDlgItem(IDC_EDIT2))->SetReadOnly(true);
- }
- BEGIN_MESSAGE_MAP(CDLG_CIRCLE, CDialog)
- //{{AFX_MSG_MAP(CDLG_CIRCLE)
- ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
- ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CDLG_CIRCLE message handlers
- void CDLG_CIRCLE::OnRadio1()
- {
-
- ((CEdit*)GetDlgItem(IDC_EDIT3))->SetReadOnly(true);
- ((CEdit*)GetDlgItem(IDC_EDIT1))->SetReadOnly(false);
- ((CEdit*)GetDlgItem(IDC_EDIT2))->SetReadOnly(true);
-
-
- }
- void CDLG_CIRCLE::OnRadio2()
- {
-
- ((CEdit*)GetDlgItem(IDC_EDIT3))->SetReadOnly(false);
- ((CEdit*)GetDlgItem(IDC_EDIT1))->SetReadOnly(true);
- ((CEdit*)GetDlgItem(IDC_EDIT2))->SetReadOnly(false);
-
- }