📄 zoomsetdlg.cpp
字号:
// ZoomSetDlg.cpp : implementation file
//
#include "stdafx.h"
#include "毕业设计.h"
#include "ZoomSetDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CZoomSetDlg dialog
CZoomSetDlg::CZoomSetDlg(int w,int h,CWnd* pParent /*=NULL*/)
: CDialog(CZoomSetDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CZoomSetDlg)
m_w = w;
m_h = h;
//}}AFX_DATA_INIT
}
void CZoomSetDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CZoomSetDlg)
DDX_Text(pDX, IDC_EDIT1, m_w);
DDX_Text(pDX, IDC_EDIT2, m_h);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CZoomSetDlg, CDialog)
//{{AFX_MSG_MAP(CZoomSetDlg)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CZoomSetDlg message handlers
void CZoomSetDlg::OnOK(){
if(UpdateData()){
CDialog::OnOK();
}
}
BOOL CZoomSetDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CWnd * w = GetDlgItem(IDC_EDIT1);
w->SetFocus();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CZoomSetDlg::OnButton1()
{
// TODO: Add your control notification handler code here
OnOK();
}
void CZoomSetDlg::OnButton2()
{
// TODO: Add your control notification handler code here
OnCancel();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -