软件工程饭店点餐内容摘要:

//////////////////////// // CMyApp: // See 餐饮管理 .cpp for the implementation of this class // class CMyApp : public CWinApp { public: CString pwd。 CString name。 _ConnectionPtr m_pCon。 CMyApp()。 // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMyApp) public: virtual BOOL InitInstance()。 //}}AFX_VIRTUAL // Implementation //{{AFX_MSG(CMyApp) // NOTE the ClassWizard will add and remove member functions here. // DO NOT EDIT what you see in these blocks of generated code ! //}}AFX_MSG DECLARE_MESSAGE_MAP() }。 17 ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. endif // !defined(AFX__H__446DF14A_A8C0_4C72_AE09_16339B51D420__INCLUDED_) // 餐饮管理 .cpp : Defines the class behaviors for the application. // include include 餐饮管理 .h include 餐饮管理 ifdef _DEBUG define new DEBUG_NEW undef THIS_FILE static char THIS_FILE[] = __FILE__。 endif ///////////////////////////////////////////////////////////////////////////// // CMyApp BEGIN_MESSAGE_MAP(CMyApp, CWinApp) //{{AFX_MSG_MAP(CMyApp) // NOTE the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG ON_COMMAND(ID_HELP, CWinApp::OnHelp) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CMyApp construction CMyApp::CMyApp() { // TODO: add construction code here, // Place all significant initialization in InitInstance } ///////////////////////////////////////////////////////////////////////////// // The one and only CMyApp object 18 CMyApp theApp。 ///////////////////////////////////////////////////////////////////////////// // CMyApp initialization BOOL CMyApp::InitInstance() { AfxEnableControlContainer()。 ::CoInitialize(NULL)。 HRESULT hr。 try { hr=()。 if(SUCCEEDED(hr)) { m_pConConnectionTimeout=3。 hr=m_pConOpen(Provider=。 Data Source=,adModeUnknown)。 } } catch(__error e) { CString temp。 (连接数据库错误信息 :%s,())。 ::MessageBox(NULL,temp,提示信息 ,NULL)。 return false。 } // Standard initialization // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need. ifdef _AFXDLL Enable3dControls()。 // Call this when using MFC in a shared DLL else Enable3dControlsStatic()。 // Call this when linking to MFC statically endif CMyDlg dlg。 m_pMainWnd = amp。 dlg。 19 int nResponse = ()。 if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is // dismissed with OK } else if (nResponse == IDCANCEL) { // TODO: Place code here to handle when the dialog is // dismissed with Cancel } // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application39。 s message pump. return FALSE。 } // 餐饮管理 : implementation file // include include 餐饮管理 .h include 餐饮管理 include include include include include include include include include include include include include include include ifdef _DEBUG 20 define new DEBUG_NEW undef THIS_FILE static char THIS_FILE[] = __FILE__。 endif ///////////////////////////////////////////////////////////////////////////// // CAboutDlg dialog used for App About extern CMyApp theApp。 class CAboutDlg : public CDialog { public: CAboutDlg()。 // Dialog Data //{{AFX_DATA(CAboutDlg) enum { IDD = IDD_ABOUTBOX }。 //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CAboutDlg) protected: virtual void DoDataExchange(CDataExchange* pDX)。 // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: //{{AFX_MSG(CAboutDlg) //}}AFX_MSG DECLARE_MESSAGE_MAP() }。 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) { //{{AFX_DATA_INIT(CAboutDlg) //}}AFX_DATA_INIT } void CAboutDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX)。 //{{AFX_DATA_MAP(CAboutDlg) //}}AFX_DATA_MAP } 21 BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) //{{AFX_MSG_MAP(CAboutDlg) // No message handlers //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CMyDlg dialog CMyDlg::CMyDlg(CWnd* pParent /*=NULL*/) : CDialog(CMyDlg::IDD, pParent) { //{{AFX_DATA_INIT(CMyDlg) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon = AfxGetApp()LoadIcon(IDR_MAINFRAME)。 } void CMyDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX)。 //{{AFX_DATA_MAP(CMyDlg) //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CMyDlg, CDialog) //{{AFX_MSG_MAP(CMyDlg) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_COMMAND(ID_MENU_login, OnMENUlogin) ON_COMMAND(ID_MENU_kaitai, OnMENUkaitai) ON_COMMAND(ID_MENU_jiezhang, OnMENUjiezhang) ON_COMMAND(IDB_kaitai, OnBUTTONkaitai) ON_COMMAND(IDB_pay, OnBUTTONjiezhang) ON_COMMAND(ID_MENU_jiesuan, OnMENUjiesuan) ON_COMMAND(IDB_rishouru, OnBUTTONrishouru) ON_COMMAND(ID_MENU_yuangong, OnMENUyuangong) ON_COMMAND(IDB_reg, OnBUTTONzhuce) ON_COMMAND(ID_MENU_about, OnMENUabout) ON_COMMAND(ID_MENU_SPinfo, OnMENUSPinfo) 22 ON_COMMAND(ID_MENU_jinhuo, On。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。