stardensitydialog.cpp
来自「在mdi client窗口的客户区域显示移动的星星的程序」· C++ 代码 · 共 58 行
CPP
58 行
// StarDensityDialog.cpp : implementation file
//
#include "StdAfx.h"
#include "Starz.h"
#include "StarzView.h"
#include "StarDensityDialog.h"
#include <assert.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CStarDensityDialog dialog
BEGIN_MESSAGE_MAP(CStarDensityDialog, CDialog)
//{{AFX_MSG_MAP(CStarDensityDialog)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
CStarDensityDialog::CStarDensityDialog(CWnd* pParent)
: CDialog(CStarDensityDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CStarDensityDialog)
density = 0;
//}}AFX_DATA_INIT
CStarzView* view = DYNAMIC_DOWNCAST(CStarzView, pParent);
assert(view);
this->density = view->getDensity();
}
void CStarDensityDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CStarDensityDialog)
DDX_Text(pDX, IDC_DENSITY, density);
DDV_MinMaxInt(pDX, density, 0, 1000);
//}}AFX_DATA_MAP
}
/////////////////////////////////////////////////////////////////////////////
// CStarDensityDialog message handlers
BOOL CStarDensityDialog::OnInitDialog()
{
CDialog::OnInitDialog();
((CSpinButtonCtrl*)this->GetDlgItem(IDC_DENSITYSPIN))->SetRange(1, 1000);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?