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

📄 dept2dlg.cpp

📁 宾馆程控电话计费系统
💻 CPP
字号:
// Dept2Dlg.cpp : implementation file
//

#include "stdafx.h"
#include "tel2006.h"
#include "Dept2Dlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDept2Dlg dialog


CDept2Dlg::CDept2Dlg(CWnd* pParent /*=NULL*/)
	: CDialog(CDept2Dlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDept2Dlg)
	m_strDeptID = _T("");
	m_strDeptName = _T("");
	//}}AFX_DATA_INIT
}


void CDept2Dlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDept2Dlg)
	DDX_Text(pDX, IDC_EDIT_DEPTID, m_strDeptID);
	DDX_Text(pDX, IDC_EDIT_DEPTNAME, m_strDeptName);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDept2Dlg, CDialog)
	//{{AFX_MSG_MAP(CDept2Dlg)
	ON_BN_CLICKED(IDC_OK_BUTTON, OnOkButton)
	ON_BN_CLICKED(IDC_CANCEL_BUTTON, OnCancelButton)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDept2Dlg message handlers

void CDept2Dlg::OnOkButton() 
{
	// TODO: Add your control notification handler code here
	UpdateData(true);
	CDialog::OnOK();
}

void CDept2Dlg::OnCancelButton() 
{
	// TODO: Add your control notification handler code here
	CDialog::OnCancel();
}

BOOL CDept2Dlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	UpdateData(false);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CDept2Dlg::SetDeptID(CString strDeptID)
{
	m_strDeptID = strDeptID;
}

CString CDept2Dlg::GetDeptID()
{
	return m_strDeptID;
}

void CDept2Dlg::SetDeptName(CString strDeptName)
{
	m_strDeptName = strDeptName;
}

CString CDept2Dlg::GetDeptName()
{
	return m_strDeptName;
}

BOOL CDept2Dlg::PreTranslateMessage(MSG* pMsg) 
{
	// TODO: Add your specialized code here and/or call the base class
	if(pMsg->message == WM_KEYDOWN)
	{
		if(pMsg->wParam == VK_RETURN)
		{
			UINT nID = GetFocus()->GetDlgCtrlID();
			switch(nID)
			{
			//case IDOK:
			//	break;
			case IDC_OK_BUTTON :
				OnOkButton();
				break;
			default:
				NextDlgCtrl();
			
			return TRUE;
			}
		}
	}
	return CDialog::PreTranslateMessage(pMsg);
}

⌨️ 快捷键说明

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