如何在程序中的任何地方取得當(dāng)前cview和cdocument的指針(外文文獻(xiàn)翻譯).doc
約8頁DOC格式手機(jī)打開展開
如何在程序中的任何地方取得當(dāng)前cview和cdocument的指針(外文文獻(xiàn)翻譯),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...
內(nèi)容介紹
此文檔由會員 wanli1988go 發(fā)布
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應(yīng)用程序中。能夠在程序中任何地方取得指針到當(dāng)前的活動document類或view類是非常有用的。例如,能夠從一個對話框取得指針到當(dāng)前活動的document類是非常有用的。本篇文章則討論實(shí)現(xiàn)上述要求的最簡單的方法,即使用MFC對象之間以及基本的MFC結(jié)構(gòu)的相互關(guān)系來完成。
Cview類
Cview類為自定義的視類提供了基本的性質(zhì)與功能。一個視是與一個文檔相聯(lián)系的并且作為文檔與用戶之間的一個中間媒介:視表現(xiàn)為文檔在屏幕上或打印機(jī)的界面視圖并且能夠解釋用戶基于文檔操作的有關(guān)輸入輸出。
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應(yīng)用程序中。能夠在程序中任何地方取得指針到當(dāng)前的活動document類或view類是非常有用的。例如,能夠從一個對話框取得指針到當(dāng)前活動的document類是非常有用的。本篇文章則討論實(shí)現(xiàn)上述要求的最簡單的方法,即使用MFC對象之間以及基本的MFC結(jié)構(gòu)的相互關(guān)系來完成。
Cview類
Cview類為自定義的視類提供了基本的性質(zhì)與功能。一個視是與一個文檔相聯(lián)系的并且作為文檔與用戶之間的一個中間媒介:視表現(xiàn)為文檔在屏幕上或打印機(jī)的界面視圖并且能夠解釋用戶基于文檔操作的有關(guān)輸入輸出。