資源簡介
程序很簡單,主要是訓練文件API
在打開這個button對應的響應里添加文件代碼
代碼片段和文件信息
//?readText.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“readText.h“
#include?“readTextDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CReadTextApp
BEGIN_MESSAGE_MAP(CReadTextApp?CWinApp)
//{{AFX_MSG_MAP(CReadTextApp)
//?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()
/////////////////////////////////////////////////////////////////////////////
//?CReadTextApp?construction
CReadTextApp::CReadTextApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CReadTextApp?object
CReadTextApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CReadTextApp?initialization
BOOL?CReadTextApp::InitInstance()
{
AfxEnableControlContainer();
//?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
CReadTextDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
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?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????3615??2010-07-12?16:52??readText\ReadMe.txt
?????文件??????35732??2010-07-12?17:06??readText\readText.aps
?????文件???????1141??2010-07-12?17:06??readText\readText.clw
?????文件???????2091??2010-07-12?16:52??readText\readText.cpp
?????文件???????4195??2010-07-12?16:52??readText\readText.dsp
?????文件????????541??2010-07-12?16:52??readText\readText.dsw
?????文件???????1346??2010-07-12?16:52??readText\readText.h
?????文件??????50176??2010-07-12?17:06??readText\readText.ncb
?????文件??????48640??2010-07-12?17:06??readText\readText.opt
?????文件????????250??2010-07-12?17:06??readText\readText.plg
?????文件???????5288??2010-07-12?17:06??readText\readText.rc
?????文件???????5274??2010-07-12?17:05??readText\readTextDlg.cpp
?????文件???????1365??2010-07-12?16:55??readText\readTextDlg.h
?????文件???????1078??2010-07-12?16:52??readText\res\readText.ico
?????文件????????400??2010-07-12?16:52??readText\res\readText.rc2
?????文件????????732??2010-07-12?16:57??readText\resource.h
?????文件????????210??2010-07-12?16:52??readText\StdAfx.cpp
?????文件???????1054??2010-07-12?16:52??readText\StdAfx.h
?????目錄??????????0??2010-07-12?16:52??readText\res
?????目錄??????????0??2010-07-12?17:06??readText
-----------?---------??----------?-----??----
???????????????163128????????????????????20
評論
共有 條評論