MFC单文档记事本


使用MFC,vs2010实现的记事本程序
资源截图
代码片段和文件信息

// notepad.cpp : 定义应用程序的类行为。
//

#include “stdafx.h“
#include “notepad.h“
#include “notepadDlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CnotepadApp

BEGIN_MESSAGE_MAP(CnotepadApp CWinApp)
ON_COMMAND(ID_HELP &CWinApp::onhelp)
END_MESSAGE_MAP()


// CnotepadApp 构造

CnotepadApp::CnotepadApp()
{
// 支持重新启动管理器
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;

// TODO: 在此处添加构造代码,
// 将所有重要的初始化放置在 InitInstance 中
}


// 唯一的一个 CnotepadApp 对象

CnotepadApp theApp;


// CnotepadApp 初始化

BOOL CnotepadApp::InitInstance()
{
// 如果一个运行在 Windows XP 上的应用程序清单指定要
// 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
//则需要 InitCommonControlsEx()。否则,将无法创建窗口。
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// 将它设置为包括所有要在应用程序中使用的
// 公共控件类。
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);

CWinApp::InitInstance();


AfxEnableControlContainer();

// 创建 shell 管理器,以防对话框包含
// 任何 shell 树视图控件或 shell 列表视图控件。
CShellManager *pShellManager = new CShellManager;

// 标准初始化
// 如果未使用这些功能并希望减小
// 最终可执行文件的大小,则应移除下列
// 不需要的特定初始化例程
// 更改用于存储设置的注册表项
// TODO: 应适当修改该字符串,
// 例如修改为公司或组织名
AfxInitRichEdit();
CnotepadDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: 在此放置处理何时用
//  “确定”来关闭对话框的代码
}
else if (nResponse == IDCANCEL)
{
// TODO: 在此放置处理何时用
//  “取消”来关闭对话框的代码
}

// 删除上面创建的 shell 管理器。
if (pShellManager != NULL)
{
delete pShellManager;
}

// 由于对话框已关闭,所以将返回 FALSE 以便退出应用程序,
//  而不是启动应用程序的消息泵。
return FALSE;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件    6331392  2014-12-16 15:46  notepadDebug
otepad.exe

     文件   14837212  2014-12-16 15:46  notepadDebug
otepad.ilk

     文件   25848832  2014-12-16 15:46  notepadDebug
otepad.pdb

     文件   88539136  2014-12-16 15:58  notepadipch
otepad-d416a03c
otepad-ee2ba5b7.ipch

    .......         1  2009-08-31 02:32  notepad
otepadClassDiagram1.cd

     文件       2080  2014-12-16 15:22  notepad
otepadDebugcl.command.1.tlog

     文件      70692  2014-12-16 15:22  notepad
otepadDebugCL.read.1.tlog

     文件       1524  2014-12-16 15:22  notepad
otepadDebugCL.write.1.tlog

     文件          2  2014-12-16 15:46  notepad
otepadDebuglink-cvtres.read.1.tlog

     文件          2  2014-12-16 15:46  notepad
otepadDebuglink-cvtres.write.1.tlog

     文件          2  2014-12-16 15:46  notepad
otepadDebuglink.4836-cvtres.read.1.tlog

     文件          2  2014-12-16 15:46  notepad
otepadDebuglink.4836-cvtres.write.1.tlog

     文件          2  2014-12-16 15:46  notepad
otepadDebuglink.4836.read.1.tlog

     文件          2  2014-12-16 15:46  notepad
otepadDebuglink.4836.write.1.tlog

     文件       1616  2014-12-16 15:46  notepad
otepadDebuglink.command.1.tlog

     文件       5680  2014-12-16 15:46  notepad
otepadDebuglink.read.1.tlog

     文件       1042  2014-12-16 15:46  notepad
otepadDebuglink.write.1.tlog

     文件        740  2014-12-16 15:46  notepad
otepadDebugmt.command.1.tlog

     文件        664  2014-12-16 15:46  notepad
otepadDebugmt.read.1.tlog

     文件        482  2014-12-16 15:46  notepad
otepadDebugmt.write.1.tlog

     文件       1630  2014-12-16 15:02  notepad
otepadDebug
otepad.Build.CppClean.log

     文件        667  2014-12-16 15:10  notepad
otepadDebug
otepad.exe.embed.manifest

     文件        732  2014-12-16 15:10  notepad
otepadDebug
otepad.exe.embed.manifest.res

     文件        381  2014-12-16 15:46  notepad
otepadDebug
otepad.exe.intermediate.manifest

     文件         56  2014-12-16 15:46  notepad
otepadDebug
otepad.lastbuildstate

     文件       1885  2014-12-16 15:46  notepad
otepadDebug
otepad.log

     文件      33938  2014-12-16 15:22  notepad
otepadDebug
otepad.obj

     文件   33685504  2014-12-16 15:02  notepad
otepadDebug
otepad.pch

     文件      81640  2014-12-16 15:46  notepad
otepadDebug
otepad.res

     文件     196040  2014-12-16 15:14  notepad
otepadDebug
otepadDlg.obj

............此处省略37个文件信息

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

发表评论

评论列表(条)