📄 phong.cpp
字号:
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -