phong.cpp

来自「本系统是一个基于Windows平台」· C++ 代码 · 共 56 行

CPP
56
字号
// Phong.cpp : implementation file
//

#include "stdafx.h"
#include "Cg50.h"
#include "Phong.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern int width=500,length=400;
/////////////////////////////////////////////////////////////////////////////
// CPhong dialog


CPhong::CPhong(CWnd* pParent /*=NULL*/)
	: CDialog(CPhong::IDD, pParent)
{
	//{{AFX_DATA_INIT(CPhong)
	m_width = 0;
	m_length = 0;
	//}}AFX_DATA_INIT
}


void CPhong::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPhong)
	DDX_Text(pDX, IDC_EDIT1, m_width);
	DDX_Text(pDX, IDC_EDIT2, m_length);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CPhong, CDialog)
	//{{AFX_MSG_MAP(CPhong)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPhong message handlers

void CPhong::OnOK() 
{CString s;
GetDlgItemText(IDC_EDIT1,s);
width=atoi(s);
GetDlgItemText(IDC_EDIT2,s);
length=atoi(s);
CDialog::OnOK();
}


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?