悠悠同学网www.uuclass.com m.line_hor(1,79,24,196); gotoxy(1,25); cout<<\any key to continue ... \ getch(); return; } display_record(t_code); gotoxy(3,12); cout<<\you want to modify this record (y/n) : \ do { valid =1 ; gotoxy(45,12); ch = getche(); ch = toupper(ch); if(ch != 'Y' && ch != 'N') { valid = 0; sound(500); delay(100); nosound(); gotoxy(45,12); clreol(); } }while(! valid); if( ch == 'N') return; modify_record(t_code); } //***************************************************************** // FUNCTION NAME : MAIN // DETAILS : IT CALLS THE STARTUP FUNCTION AND // MENU FUNCTION. //***************************************************************** void main(void) { menu m; m.startup(); m.main_menu(); }
悠悠同学网www.uuclass.com
附录
Base.Dlg.cpp程序: #include \#include \#include \#include \#include \
#ifdef _DEBUG
#define new DEBUG_NEW #undef THIS_FILE
static char THIS_FILE[] = __FILE__; #endif
///////////////////////////////////////////////////////////////////////////// // CBaseDlg dialog
CBaseDlg::CBaseDlg(CWnd* pParent /*=NULL*/) { }
//{{AFX_DATA_INIT(CBaseDlg)
// NOTE: the ClassWizard will add member initialization here : CDialog(CBaseDlg::IDD, pParent)
//}}AFX_DATA_INIT
悠悠同学网www.uuclass.com
void CBaseDlg::DoDataExchange(CDataExchange* pDX) { }
BEGIN_MESSAGE_MAP(CBaseDlg, CDialog)
//{{AFX_MSG_MAP(CBaseDlg) //}}AFX_MSG_MAP
CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CBaseDlg)
DDX_Control(pDX, IDC_TAB_BASE, m_oTabBase); //}}AFX_DATA_MAP
END_MESSAGE_MAP()
///////////////////////////////////////////////////////////////////////////// // CBaseDlg message handlers
BOOL CBaseDlg::OnInitDialog() {
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_oTabBase.AddPage(\商品类别\m_oTabBase.AddPage(\商品资料\TERIEL); m_oTabBase.AddPage(\付款方式\m_oTabBase.Show();
return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE
悠悠同学网www.uuclass.com
}
CallDlg.cpp程序: #include \#include \#include \
#ifdef _DEBUG
#define new DEBUG_NEW #undef THIS_FILE
static char THIS_FILE[] = __FILE__; #endif
///////////////////////////////////////////////////////////////////////////// // CCallDlg dialog
extern CMyPosApp theApp;
CCallDlg::CCallDlg(CWnd* pParent /*=NULL*/) { }
void CCallDlg::DoDataExchange(CDataExchange* pDX) {
CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CCallDlg) //{{AFX_DATA_INIT(CCallDlg)
// NOTE: the ClassWizard will add member initialization here : CDialog(CCallDlg::IDD, pParent)
//}}AFX_DATA_INIT
悠悠同学网www.uuclass.com
}
DDX_Control(pDX, IDC_STATIC_CALL, m_oCallstatic); DDX_Control(pDX, IDC_EDIT_CALLBILLID, m_oCallbillid); //}}AFX_DATA_MAP
BEGIN_MESSAGE_MAP(CCallDlg, CDialog)
//{{AFX_MSG_MAP(CCallDlg) //}}AFX_MSG_MAP
END_MESSAGE_MAP()
///////////////////////////////////////////////////////////////////////////// // CCallDlg message handlers
void CCallDlg::OnOK() { }
BOOL CCallDlg::OnInitDialog() {
CDialog::OnOK(); if(dowhat==\{ }
if(dowhat==\
m_oCallbillid.GetWindowText(dowhat); theApp.scallid=\
m_oCallbillid.GetWindowText(theApp.scallid);