如何在程序中的任何地方取得当前cview和cdocument的指针(外文文献翻译).doc

约8页DOC格式手机打开展开

如何在程序中的任何地方取得当前cview和cdocument的指针(外文文献翻译),anywheresummary in a microsoft foundation classes (mfc) windows-based application, it is often useful to be able to get a pointer to the currently active docume...
编号:10-206302大小:50.50K
分类: 论文>外文翻译

内容介绍

此文档由会员 wanli1988go 发布

Anywhere
SUMMARY
In a Microsoft Foundation Classes (MFC) Windows-based application, it is often useful to be able to get a pointer to the currently active document or view from anywhere in the program. For example, being able to access the current document from a dialog box is sometimes useful. This article discusses the simplest methods for doing so, using the relationships between MFC objects, and basic MFC architecture.
CView
This class provides the basic functionality for user-defined view classes. A view is attached to a document and acts as an intermediary between the document and the user: the view renders an image of the document on the screen or printer and interprets user input as operations upon the document.
摘 要
在基于MFC的Windows应用程序中。能够在程序中任何地方取得指针到当前的活动document类或view类是非常有用的。例如,能够从一个对话框取得指针到当前活动的document类是非常有用的。本篇文章则讨论实现上述要求的最简单的方法,即使用MFC对象之间以及基本的MFC结构的相互关系来完成。

Cview类
Cview类为自定义的视类提供了基本的性质与功能。一个视是与一个文档相联系的并且作为文档与用户之间的一个中间媒介:视表现为文档在屏幕上或打印机的界面视图并且能够解释用户基于文档操作的有关输入输出。