marginsetup.cpp

来自「《Visual C++.NET MFC类库应用详解》程序实例」· C++ 代码 · 共 44 行

CPP
44
字号
// MarginSetup.cpp : 实现文件
//

#include "stdafx.h"
#include "WordEdit.h"
#include "MarginSetup.h"


// CMarginSetup 对话框

IMPLEMENT_DYNAMIC(CMarginSetup, CDialog)
CMarginSetup::CMarginSetup(CWnd* pParent /*=NULL*/)
	: CDialog(CMarginSetup::IDD, pParent)
	, m_MarginLeft(2.0f)
	, m_MarginRight(2.0f)
	, m_MarginTop(2.0f)
	, m_MarginBottom(2.0f)
{
}

CMarginSetup::~CMarginSetup()
{
}

void CMarginSetup::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Text(pDX, IDC_EDIT_BOTTOM, m_MarginBottom);
	DDV_MinMaxFloat(pDX, m_MarginBottom, 0.f, 8.f);
	DDX_Text(pDX, IDC_EDIT_LEFT, m_MarginLeft);
	DDV_MinMaxFloat(pDX, m_MarginLeft, 0.f, 8.f);
	DDX_Text(pDX, IDC_EDIT_RIGHT, m_MarginRight);
	DDV_MinMaxFloat(pDX, m_MarginRight, 0.f, 8.f);
	DDX_Text(pDX, IDC_EDIT_TOP, m_MarginTop);
	DDV_MinMaxFloat(pDX, m_MarginTop, 0.f, 8.f);
}


BEGIN_MESSAGE_MAP(CMarginSetup, CDialog)
END_MESSAGE_MAP()


// CMarginSetup 消息处理程序

⌨️ 快捷键说明

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