cashdlg.cpp

来自「酒店管理系统的毕业设计,用VC编的,功能有限」· C++ 代码 · 共 62 行

CPP
62
字号
// cashDlg.cpp : implementation file
//

#include "stdafx.h"

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

/////////////////////////////////////////////////////////////////////////////
// cashDlg dialog


cashDlg::cashDlg(CWnd* pParent /*=NULL*/)
	: CDialog(cashDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(cashDlg)
	//}}AFX_DATA_INIT
}


void cashDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(cashDlg)
	DDX_Control(pDX, IDC_STATICCASH, m_cash);
	DDX_Control(pDX, IDC_LIST1, m_list);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// cashDlg message handlers

BOOL cashDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	for(int i = 0 ;i< CountRoom;i++)
		m_list.AddString(room[i]);
    CString  str;
	str.Format("%d",totalPrice);
    m_cash.SetWindowText(str);
	// TODO: Add extra initialization here
	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}

void cashDlg::init(CString *str,int price,int count)
{ 
	CountRoom = count;
	totalPrice = price;
    for(int i = 0 ;i< count;i++)
		room[i]=str[i];
}

⌨️ 快捷键说明

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