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

📄 dlgaddvalue.cpp

📁 有关界面的编程源码。很有参考价值!值得一看
💻 CPP
字号:
// DlgAddValue.cpp : implementation file
//

#include "stdafx.h"
#include "Redit.h"
#include "DlgAddValue.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDlgAddValue dialog


CDlgAddValue::CDlgAddValue(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgAddValue::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgAddValue)
	// NOTE: the ClassWizard will add member initialization here
	m_strValueData = _T("");
	m_strValueName = _T("");
	//}}AFX_DATA_INIT
	m_dwDataType = REG_SZ;
}


void CDlgAddValue::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgAddValue)
	DDX_Text(pDX, IDC_EDIT_VALUEDATA, m_strValueData);
	DDX_Text(pDX, IDC_EDIT_VALUENAME, m_strValueName);
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgAddValue, CDialog)
	//{{AFX_MSG_MAP(CDlgAddValue)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgAddValue message handlers
void CDlgAddValue::OnOK() 
{
	// TODO: Add extra validation here
	CDialog::OnOK();
}

BOOL CDlgAddValue::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	if (m_dwDataType == REG_DWORD)
	{
		GetDlgItem(IDC_EDIT_VALUEDATA)->ModifyStyle(0, ES_NUMBER, 0);
		SetWindowText(_T("Add a DWORD Value"));
	}
	else
	if (m_dwDataType == REG_SZ || m_dwDataType == REG_MULTI_SZ || m_dwDataType == REG_EXPAND_SZ)
	{
		SetWindowText(_T("Add a String Value"));
	}
	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 + -