資源簡介
這是我們小組在老師規定時間內完成的一份MFC項目,大體上應該有的功能都具備了,適合初學者研究使用。

代碼片段和文件信息
//?addnewtxt.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“new12091.h“
#include?“information.h“
#include?“fstream.h“
#include?“addnewtxt.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?addnewtxt?dialog
addnewtxt::addnewtxt(CWnd*?pParent?/*=NULL*/)
:?CDialog(addnewtxt::IDD?pParent)
{
//{{AFX_DATA_INIT(addnewtxt)
m_ntxt?=?_T(““);
//}}AFX_DATA_INIT
}
void?addnewtxt::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(addnewtxt)
DDX_Control(pDX?IDOK?m_antxt);
DDX_Text(pDX?IDC_NTXT?m_ntxt);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(addnewtxt?CDialog)
//{{AFX_MSG_MAP(addnewtxt)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?addnewtxt?message?handlers
void?addnewtxt::OnOK()?
{??
CNew12091App?*app=(CNew12091App*)AfxGetApp();
UpdateData(TRUE);???//要提前刷新。
information?m_i;
BOOL?end=FALSE;?????//定義bool?end=FALSE。
CStdioFile?file;????//CStdioFile繼承自CFile,一個CStdioFile對象代表一個用運行時函數fope打開的C運行時流式文件。
CString?str;
str=m_ntxt+“.txt“;
app->h_filename=str;
MessageBox(str);
fstream?i(strios::in);
MessageBox(“創建“+str+“成功““SUCESS“MB_OK);
UpdateData(FALSE);
CDialog::OnOK();
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1453??2014-12-16?17:48??Address?book\addnewtxt.cpp
?????文件???????1191??2014-12-14?17:23??Address?book\addnewtxt.h
?????文件??????11995??2014-12-16?18:03??Address?book\age.cpp
?????文件???????1591??2014-12-16?01:07??Address?book\age.h
?????文件????????945??2014-12-10?00:06??Address?book\class.cpp
?????文件???????1168??2014-12-10?00:14??Address?book\class.h
?????文件???????1093??2014-12-10?01:15??Address?book\class1.cpp
?????文件???????1182??2014-12-10?01:15??Address?book\class1.h
?????文件??????20389??2014-12-16?17:48??Address?book\Debug\addnewtxt.obj
?????文件??????26071??2014-12-16?17:48??Address?book\Debug\addnewtxt.sbr
?????文件??????66067??2014-12-16?18:03??Address?book\Debug\age.obj
?????文件??????31814??2014-12-16?18:03??Address?book\Debug\age.sbr
?????文件??????11821??2014-12-14?19:55??Address?book\Debug\class1.obj
?????文件??????????0??2014-12-14?19:55??Address?book\Debug\class1.sbr
?????文件??????25173??2014-12-16?17:48??Address?book\Debug\FIND.obj
?????文件??????26643??2014-12-16?17:48??Address?book\Debug\FIND.sbr
?????文件??????15468??2014-12-16?17:48??Address?book\Debug\information.obj
?????文件???????4070??2014-12-16?17:48??Address?book\Debug\information.sbr
?????文件??????13460??2014-12-16?18:01??Address?book\Debug\lload.obj
?????文件???????3565??2014-12-16?18:01??Address?book\Debug\lload.sbr
?????文件??????10012??2014-12-09?23:17??Address?book\Debug\LOAD.obj
?????文件????3163136??2014-12-16?01:29??Address?book\Debug\new12091.bsc
?????文件????2215993??2014-12-16?18:03??Address?book\Debug\new12091.exe
?????文件????2642076??2014-12-16?18:03??Address?book\Debug\new12091.ilk
?????文件??????18444??2014-12-16?01:33??Address?book\Debug\new12091.obj
?????文件????6839476??2014-12-16?01:33??Address?book\Debug\new12091.pch
?????文件????4301824??2014-12-16?18:03??Address?book\Debug\new12091.pdb
?????文件??????10448??2014-12-16?17:22??Address?book\Debug\new12091.res
?????文件???????4068??2014-12-16?01:33??Address?book\Debug\new12091.sbr
?????文件??????29964??2014-12-16?17:49??Address?book\Debug\new12091Dlg.obj
............此處省略38個文件信息
評論
共有 條評論