2DotNet平台技术实验报告3Word文档下载推荐.docx

上传人:b****5 文档编号:15686443 上传时间:2022-11-15 格式:DOCX 页数:32 大小:119.53KB
下载 相关 举报
2DotNet平台技术实验报告3Word文档下载推荐.docx_第1页
第1页 / 共32页
2DotNet平台技术实验报告3Word文档下载推荐.docx_第2页
第2页 / 共32页
2DotNet平台技术实验报告3Word文档下载推荐.docx_第3页
第3页 / 共32页
2DotNet平台技术实验报告3Word文档下载推荐.docx_第4页
第4页 / 共32页
2DotNet平台技术实验报告3Word文档下载推荐.docx_第5页
第5页 / 共32页
点击查看更多>>
下载资源
资源描述

2DotNet平台技术实验报告3Word文档下载推荐.docx

《2DotNet平台技术实验报告3Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《2DotNet平台技术实验报告3Word文档下载推荐.docx(32页珍藏版)》请在冰豆网上搜索。

2DotNet平台技术实验报告3Word文档下载推荐.docx

protected:

//仅从序列化创建

CMainFrame();

DECLARE_DYNCREATE(CMainFrame)

//特性

public:

//操作

//重写

virtualBOOLPreCreateWindow(CREATESTRUCT&

cs);

virtualBOOLLoadFrame(UINTnIDResource,DWORDdwDefaultStyle=WS_OVERLAPPEDWINDOW|FWS_ADDTOTITLE,CWnd*pParentWnd=NULL,CCreateContext*pContext=NULL);

//实现

virtual~CMainFrame();

#ifdef_DEBUG

virtualvoidAssertValid()const;

virtualvoidDump(CDumpContext&

dc)const;

#endif

//控件条嵌入成员

CMFCMenuBarm_wndMenuBar;

CMFCToolBarm_wndToolBar;

CMFCStatusBarm_wndStatusBar;

CMFCToolBarImagesm_UserImages;

//生成的消息映射函数

afx_msgintOnCreate(LPCREATESTRUCTlpCreateStruct);

afx_msgvoidOnViewCustomize();

(续)

afx_msgLRESULTOnToolbarCreateNew(WPARAMwp,LPARAMlp);

DECLARE_MESSAGE_MAP()

};

//MyThread.h:

MyThread应用程序的主头文件

#ifndef__AFXWIN_H__

#error"

在包含此文件之前包含“stdafx.h”以生成PCH文件"

#include"

resource.h"

//主符号

//CMyThreadApp:

//有关此类的实现,请参阅MyThread.cpp

classCMyThreadApp:

publicCWinAppEx

CMyThreadApp();

virtualBOOLInitInstance();

virtualintExitInstance();

BOOLm_bHiColorIcons;

virtualvoidPreLoadState();

virtualvoidLoadCustomState();

virtualvoidSaveCustomState();

afx_msgvoidOnAppAbout();

externCMyThreadApptheApp;

//MyThreadDoc.h:

CMyThreadDoc类的接口

classCMyThreadDoc:

publicCDocument

CMyThreadDoc();

DECLARE_DYNCREATE(CMyThreadDoc)

virtualBOOLOnNewDocument();

virtualvoidSerialize(CArchive&

ar);

#ifdefSHARED_HANDLERS

virtualvoidInitializeSearchContent();

virtualvoidOnDrawThumbnail(CDC&

dc,LPRECTlprcBounds);

#endif//SHARED_HANDLERS

virtual~CMyThreadDoc();

//用于为搜索处理程序设置搜索内容的Helper函数

voidSetSearchContent(constCString&

value);

//MyThreadView.h:

CMyThreadView类的接口

classCMyThreadView:

publicCView

CMyThreadView();

DECLARE_DYNCREATE(CMyThreadView)

CMyThreadDoc*GetDocument()const;

virtualvoidOnDraw(CDC*pDC);

//重写以绘制该视图

virtualBOOLOnPreparePrinting(CPrintInfo*pInfo);

virtualvoidOnBeginPrinting(CDC*pDC,CPrintInfo*pInfo);

virtualvoidOnEndPrinting(CDC*pDC,CPrintInfo*pInfo);

virtual~CMyThreadView();

afx_msgvoidOnFilePrintPreview();

afx_msgvoidOnRButtonUp(UINTnFlags,CPointpoint);

afx_msgvoidOnContextMenu(CWnd*pWnd,CPointpoint);

afx_msgvoidOnStartthread();

afx_msgvoidOnStopthread();

#ifndef_DEBUG//MyThreadView.cpp中的调试版本

inlineCMyThreadDoc*CMyThreadView:

:

GetDocument()const

{returnreinterpret_cast<

CMyThreadDoc*>

(m_pDocument);

}

//MainFrm.cpp:

CMainFrame类的实现

stdafx.h"

MyThread.h"

MainFrm.h"

#definenewDEBUG_NEW

//CMainFrame

IMPLEMENT_DYNCREATE(CMainFrame,CFrameWndEx)

constintiMaxUserToolbars=10;

constUINTuiFirstUserToolBarId=AFX_IDW_CONTROLBAR_FIRST+40;

constUINTuiLastUserToolBarId=uiFirstUserToolBarId+iMaxUserToolbars-1;

BEGIN_MESSAGE_MAP(CMainFrame,CFrameWndEx)

ON_WM_CREATE()

ON_COMMAND(ID_VIEW_CUSTOMIZE,&

CMainFrame:

OnViewCustomize)

ON_REGISTERED_MESSAGE(AFX_WM_CREATETOOLBAR,&

OnToolbarCreateNew)

END_MESSAGE_MAP()

staticUINTindicators[]=

ID_SEPARATOR,//状态行指示器

ID_INDICATOR_CAPS,

ID_INDICATOR_NUM,

ID_INDICATOR_SCRL,

//CMainFrame构造/析构

CMainFrame()

//TODO:

在此添加成员初始化代码

}

~CMainFrame()

intCMainFrame:

OnCreate(LPCREATESTRUCTlpCreateStruct)

if(CFrameWndEx:

OnCreate(lpCreateStruct)==-1)

return-1;

BOOLbNameValid;

//设置用于绘制所有用户界面元素的视觉管理器

CMFCVisualManager:

SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerVS2008));

if(!

m_wndMenuBar.Create(this))

{

TRACE0("

未能创建菜单栏\n"

);

//未能创建

m_wndMenuBar.SetPaneStyle(m_wndMenuBar.GetPaneStyle()|CBRS_SIZE_DYNAMIC|CBRS_TOOLTIPS|CBRS_FLYBY);

//防止菜单栏在激活时获得焦点

CMFCPopupMenu:

SetForceMenuFocus(FALSE);

m_wndToolBar.Creat

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程科技 > 能源化工

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1