在mfc中如何使用extern和external,我想知道如何在CView类中定义了一个变量,如何在CDoc中调用
1,在CView的 cpp文件中的函数外面进行如下定义:
int a;
2,在某个地方进行初始化,如CView的构造函数中。或者将上面的定义写成
int a=100;
3,在CDoc的要使用这个变量的函数中,写下如下代码:
extern int a;
external
--------------------------------------------------------------------------------
Description
Allows access to an additional object model provided by host applications of the Internet Explorer browser components. In a hosting scenario where it is available, the object model is defined by the application hosting the Internet Explorer components, and the hosting application should be referred to for documentation. For further details on how to implement extensions to the object model, see the SDK documentation on "Reusing the WebBrowser and MSHTML."