?? graphdlg.cpp
字號:
// GraphDlg.cpp : implementation file
//
#include "stdafx.h"
#include "exp33_1.h"
#include "GraphDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CGraphDlg dialog
CGraphDlg::CGraphDlg(CWnd* pParent /*=NULL*/)
: CDialog(CGraphDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CGraphDlg)
m_strEnd = _T("");
m_intType = -1;
m_intRed = 0;
m_intX1 = 0;
m_intY1 = 0;
m_intY2 = 0;
m_intX2 = 0;
m_intBlue = 0;
m_intGreen = 0;
m_strStart = _T("");
//}}AFX_DATA_INIT
}
void CGraphDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CGraphDlg)
DDX_Control(pDX, IDC_RED, m_editRed);
DDX_Control(pDX, IDC_GREEN, m_editGreen);
DDX_Control(pDX, IDC_BLUE, m_editBlue);
DDX_Control(pDX, IDC_SPIN3, m_spinBlue);
DDX_Control(pDX, IDC_SPIN2, m_spinGreen);
DDX_Control(pDX, IDC_SPIN1, m_spinRed);
DDX_Text(pDX, IDC_END, m_strEnd);
DDX_Radio(pDX, IDC_LINE, m_intType);
DDX_Text(pDX, IDC_RED, m_intRed);
DDV_MinMaxInt(pDX, m_intRed, 0, 255);
DDX_Text(pDX, IDC_X1, m_intX1);
DDX_Text(pDX, IDC_Y1, m_intY1);
DDX_Text(pDX, IDC_Y2, m_intY2);
DDX_Text(pDX, IDC_X2, m_intX2);
DDX_Text(pDX, IDC_BLUE, m_intBlue);
DDV_MinMaxInt(pDX, m_intBlue, 0, 255);
DDX_Text(pDX, IDC_GREEN, m_intGreen);
DDV_MinMaxInt(pDX, m_intGreen, 0, 255);
DDX_Text(pDX, IDC_START, m_strStart);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CGraphDlg, CDialog)
//{{AFX_MSG_MAP(CGraphDlg)
ON_BN_CLICKED(IDC_LINE, OnRadioLine)
ON_BN_CLICKED(IDC_CIRCLE, OnRadioCircle)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CGraphDlg message handlers
BOOL CGraphDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_spinBlue.SetBuddy(&m_editBlue);
m_spinBlue.SetRange(0,255);
m_spinBlue.SetBase(1);
m_spinGreen.SetBuddy(&m_editGreen);
m_spinGreen.SetRange(0,255);
m_spinGreen.SetBase(1);
m_spinRed.SetBuddy(&m_editRed);
m_spinRed.SetRange(0,255);
m_spinRed.SetBase(1);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CGraphDlg::OnOK()
{
// TODO: Add extra validation here
UpdateData(TRUE);
CDialog::OnOK();
}
void CGraphDlg::OnRadioLine()
{
// TODO: Add your control notification handler code here
m_intType = 0;
GetDlgItem(IDC_Y2)->EnableWindow(TRUE);
GetDlgItem(IDC_STATIC_Y2)->EnableWindow(TRUE);
GetDlgItem(IDC_STATIC_X2)->EnableWindow(TRUE);
m_strEnd = "終點";
m_strStart = "起點";
UpdateData(FALSE);
}
void CGraphDlg::OnRadioCircle()
{
// TODO: Add your control notification handler code here
m_intType = 1;
GetDlgItem(IDC_Y2)->EnableWindow(FALSE);
GetDlgItem(IDC_STATIC_Y2)->EnableWindow(FALSE);
GetDlgItem(IDC_STATIC_X2)->EnableWindow(FALSE);
m_strEnd = "半徑";
m_strStart = "圓心";
UpdateData(FALSE);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -