All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
C#编程技巧,轻松实现对文件的操作_.net资料_编程技术
用SQL实现分页的三种方法_[SQL,Server教程]
扩展,GridView,控件,-,支持,Excel,及,Word,汇出_[Asp.Net教程]
.net,2.0中新增的nullable类型_[Asp.Net教程]
SQL,SERVER中字段类型及说明_mssql学习_编程技术
用COM自动服务扩展SQL,Server的功能_[SQL,Server教程]
HTML 5 预览(4)_[Html教程]
Asp.net和C#开发中的一些注意事项及小技巧_.net资料_编程技术
教你轻松给流程增加权限控制程序_.net资料_编程技术
超级强大的表单验证代码_JavaScript技术_编程技术
Reading number is top 10 pictures
八个盛产美女的国家1
张家界的玻璃桥
汪峰的梦想
非笑不可:最强爆笑图片精选
心有鱼而力不足
Cesarean section, bloody, silently into it!2
支持判处贩卖儿童者死刑
再来随便发几张
赵惟依写真1
Exquisite decoration is not paying too much2
Download software ranking
变速齿轮3.26
Unix video tutorial7
Such love down(擒爱记)
SP3 for SQL2000
株洲本地在线棋牌游戏
WebService在.NET中的实战应用教学视频 → 第5集
The cock of the Grosvenor LTD handsome
美女游泳记
Boxer's Top ten classic battle8
C#与.NET技术平台实战演练
qq published in(发表于) 2014/7/9 22:38:41 Edit(编辑)
visual c++ 常用的mfc CRuntimeClass结构

visual c++ 常用的mfc CRuntimeClass结构

visual c++ 常用的mfc CRuntimeClass结构

visual c++ 常用的mfc CRuntimeClass结构

在许多计算机书籍中,CRuntimeClass被称为类,实际上,CRuntimeClass在MFC中是以结构的方式定义的,虽然它也包含成员函数。这个结构定义在Afx.h中,它包含了使用CRuntimeClass结构的类的有关信息。

CRuntimeClass结构的原型如下:

struct CRuntimeClass

{

LPCSTR m_lpszClassName;

int m_nObjectSize;

UINT m_wSchema; // schema number of the loaded class

CObject* (PASCAL* m_pfnCreateObject)(); // NULL => abstract class

#ifdef _AFXDLL

CRuntimeClass* (PASCAL* m_pfnGetBaseClass)();

#else

CRuntimeClass* m_pBaseClass;

#endif

// Operations

CObject* CreateObject();

BOOL IsDerivedFrom(const CRuntimeClass* pBaseClass) const;

// Implementation

void Store(CArchive& ar) const;

static CRuntimeClass* PASCAL Load(CArchive& ar, UINT* pwSchemaNum);

// CRuntimeClass objects linked together in simple list

CRuntimeClass* m_pNextClass; // linked list of registered classes

};

在CRuntimeClass结构中定义了类名、对象所占存储空间的大小、类的版本号等成员变量及动态创建对象、派生关系判断等成员函数。

CRuntimeClass结构在MFC中有着至关重要的作用,要继承CObject类的功能离不开CRuntimeClass结构,每个从CObject类派生的类都有一个CRuntimeClass结构同它关联,以便完成在运行时得到对象的信息或其基类的信息。

要使用CRuntimeCalss结构,必须结合使用RUNTIME_CLASS()宏和其他有关运行时类型识别的MFC宏。




添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.