⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comctldlg.cpp

📁 这个是我们学校用的VC++教案
💻 CPP
字号:
// ComctlDlg.cpp : implementation file
//

#include "stdafx.h"
#include "ExmpComctl.h"
#include "ComctlDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CComctlDlg dialog


CComctlDlg::CComctlDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CComctlDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CComctlDlg)
	m_nLineWt = 0;
	//}}AFX_DATA_INIT
}


void CComctlDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CComctlDlg)
	DDX_Control(pDX, IDC_SPINLINEWT, m_Spin);
	DDX_Text(pDX, IDC_EDITLINEWT, m_nLineWt);
	DDV_MinMaxUInt(pDX, m_nLineWt, 0, 10);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CComctlDlg message handlers

BOOL CComctlDlg::OnInitDialog()   // 初始化对话框时调用
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	//m_Spin.SetBuddy(GetDlgItem(IDC_EDITLINEWT));   // 动态设置关联控件时调用该函数
	m_Spin.SetRange(0, 10);   // 设置最小值和最大值
	m_Spin.SetPos(1);   // 设置当前位置
	
	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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -