程序部分重要代码以下是图书管理系统的部分功能以及实现这些功能的代码(1). 图书管理系统登陆界面实现的代码如下: CLibraryDlg::CLibraryDlg(CWnd* pParent /*=NULL*/) : CDialog(CLibraryDlg::IDD, pParent) { //{{AFX_DATA_INIT(CLibraryDlg) m_strPassword = _T(""); m_strUsername = _T(""); //}}AFX_DATA_INIT // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } void CLibraryDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CLibraryDlg) DDX_Text(pDX, IDC_EDIT_PASSWD, m_strPassword); DDX_Text(pDX, IDC_EDIT_USER, m_strUsername); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CLibraryDlg, CDialog) //{{AFX_MSG_MAP(CLibraryDlg) ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_BN_CLICKED(IDC_BUTTON_OK, OnButtonOk) ON_BN_CLICKED(IDC_BUTTON_CANCEL, OnButtonCancel) ON_WM_CLOSE()