MFC简单图书馆管理系统


MFC实现简单图书馆管理系统。实现图书的借阅、归还,图书信息录入读出,读者信息管理,借书信息等
资源截图
代码片段和文件信息
// bookdlg.cpp : implementation file
//

#include “stdafx.h“
#include “test.h“
#include “bookdlg.h“
#include “fstream.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// Cbookdlg dialog


Cbookdlg::Cbookdlg(CWnd* pParent /*=NULL*/)
: CDialog(Cbookdlg::IDD pParent)
{
//{{AFX_DATA_INIT(Cbookdlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}


void Cbookdlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Cbookdlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(Cbookdlg CDialog)
//{{AFX_MSG_MAP(Cbookdlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// Cbookdlg message handlers

BOOL Cbookdlg::OnInitDialog() 
{
CDialog::OnInitDialog();

// TODO: Add extra initialization here
ifstream file(“book.txt“);
    char ch[100];
int n=1;
   
while(file.getline(chsizeof(ch)‘;‘))

if(n==1)
{  
((CListBox*)GetDlgItem(IDC_LIST3))->AddString(ch);
n=0;
}
else if(n==0)
{n=1;}
else {((CListBox*)GetDlgItem(IDC_LIST3))->AddString(“发生错误!“);}
}
return TRUE;  // return TRUE unless you set the focus to a control
              // EXCEPTION: OCX Property Pages should return FALSE
}



 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-07-16 12:41  test
     文件           0  2014-06-26 15:21  test(null).txt
     文件           0  2014-07-07 21:11  test1.txt
     文件           0  2014-07-07 21:11  test2.txt
     文件           0  2014-07-07 21:11  test3.txt
     文件           0  2014-06-26 15:21  test5.txt
     文件           0  2014-06-26 15:21  test6.txt
     文件         314  2014-07-07 21:11  testook.txt
     文件        1507  2014-06-25 11:17  testookdlg.cpp
     文件        1201  2014-06-25 11:17  testookdlg.h
     文件        4185  2014-06-24 17:54  testookdlg1.cpp
     文件        1344  2014-06-21 17:23  testookdlg1.h
     文件        2948  2014-06-26 13:31  testookdlg2.cpp
     文件        1251  2014-06-23 01:46  testookdlg2.h
     文件        1037  2014-06-22 02:37  testookdlg3.cpp
     文件        1183  2014-06-22 02:29  testookdlg3.h
     目录           0  2014-07-07 21:19  testDebug
     文件         110  2014-06-26 16:55  testDebugook.txt
     文件       13316  2014-07-07 21:19  testDebugookdlg.obj
     文件           0  2014-07-07 21:19  testDebugookdlg.sbr
     文件       26670  2014-07-07 21:19  testDebugookdlg1.obj
     文件           0  2014-07-07 21:19  testDebugookdlg1.sbr
     文件       21310  2014-07-07 21:19  testDebugookdlg2.obj
     文件           0  2014-07-07 21:19  testDebugookdlg2.sbr
     文件       12749  2014-06-22 02:37  testDebugookdlg3.obj
     文件           0  2014-06-22 02:37  testDebugookdlg3.sbr
     文件       24054  2014-07-07 21:19  testDebugLoginDlg.obj
     文件           0  2014-07-07 21:19  testDebugLoginDlg.sbr
     文件       21394  2014-07-07 21:19  testDebugLoginDlg2.obj
     文件           0  2014-07-07 21:19  testDebugLoginDlg2.sbr
     文件       17048  2014-06-24 23:23  testDebugLoginDlg3.obj
............此处省略117个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)