资源描述:
《mfc图书管理系统_cpp文件》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、1BookMDlg.cpp//BookMDlg.cpp:implementationfile#include"stdafx.h"#include"MFC_Library_Ribbon.h"#include"BookMDlg.h"#include"afxdialogex.h"#include"MFC_Library_RibbonView.h"//CBookMDlgdialogIMPLEMENT_DYNAMIC(CBookMDlg,CDialogEx)CBookMDlg::CBookMDlg(CWnd*pP
2、arent/*=NULL*/):CDialogEx(CBookMDlg::IDD,pParent),m_strBookNameQ(_T("")),m_strBookIdQ(_T("")),m_strBookName(_T("")),m_strBookId(_T("")),m_strBookPress(_T("")),m_strBookAuthor(_T("")),m_strCanBorrow(_T("")),m_bAdd(false),m_bEdit(false),m_tPressDate(0),m_p
3、Parent(pParent){}CBookMDlg::~CBookMDlg(){}voidCBookMDlg::DoDataExchange(CDataExchange*pDX){CDialogEx::DoDataExchange(pDX);DDX_Text(pDX,IDC_BOOK_NAME_Q,m_strBookNameQ);DDX_Text(pDX,IDC_BOOK_ID_Q,m_strBookIdQ);DDX_Text(pDX,IDC_BOOK_NAME,m_strBookName);DDX_
4、Text(pDX,IDC_BOOK_ID,m_strBookId);DDX_Text(pDX,IDC_BOOK_PRESS,m_strBookPress);DDX_Text(pDX,IDC_BOOK_AUTHOR,m_strBookAuthor);DDX_Text(pDX,IDC_BOOK_CANBORROW,m_strCanBorrow);DDX_DateTimeCtrl(pDX,IDC_PRESS_DATE,m_tPressDate);DDX_Control(pDX,IDC_PRESS_DATE,P
5、ressDateCtrl);}BEGIN_MESSAGE_MAP(CBookMDlg,CDialogEx)ON_BN_CLICKED(IDC_BTN_SEARCH,&CBookMDlg::OnBnClickedBtnSearch)ON_BN_CLICKED(IDC_BTN_RETURN,&CBookMDlg::OnBnClickedBtnReturn)ON_BN_CLICKED(IDC_BTN_FIRST,&CBookMDlg::OnBnClickedBtnFirst)ON_BN_CLICKED(IDC
6、_BTN_PREV,&CBookMDlg::OnBnClickedBtnPrev)ON_BN_CLICKED(IDC_BTN_LAST,&CBookMDlg::OnBnClickedBtnLast)ON_BN_CLICKED(IDC_BTN_NEXT,&CBookMDlg::OnBnClickedBtnNext)ON_BN_CLICKED(IDC_BTN_ADD,&CBookMDlg::OnBnClickedBtnAdd)ON_BN_CLICKED(IDC_BTN_EDIT,&CBookMDlg::On
7、BnClickedBtnEdit)ON_BN_CLICKED(IDC_BTN_SAVE,&CBookMDlg::OnBnClickedBtnSave)ON_BN_CLICKED(IDC_BTN_CANCEL,&CBookMDlg::OnBnClickedBtnCancel)ON_BN_CLICKED(IDC_BTN_DELETE,&CBookMDlg::OnBnClickedBtnDelete)ON_WM_SIZE()ON_WM_DESTROY()ON_BN_CLICKED(IDCANCEL,&CBoo
8、kMDlg::OnBnClickedCancel)END_MESSAGE_MAP()//CBookMDlgmessagehandlersvoidCBookMDlg::DisplayRecord(void){if(bookDataSet.IsBOF()&&bookDataSet.IsEOF()){m_strBookId=L"";m_strBookName=L"";m_strBookPress=L"";m_strBookAuthor=L"";m