当前位置: 首页 > news >正文

三合一网站开发黑帽seo教程

三合一网站开发,黑帽seo教程,销售网站制作,成都网站建设 城最近有些朋友在看《深入浅出MFC》的时候,被第三章的几个宏给卡住了,记得我第一次看此书时,也被这几个宏给卡住。当然真正卡人的其实是第一个,也就是DECLARE_DYNAMIC/IMPLEMENT_DYNAMIC。我做了一个详解,供同样被卡住的…

最近有些朋友在看《深入浅出MFC》的时候,被第三章的几个宏给卡住了,记得我第一次看此书时,也被这几个宏给卡住。当然真正卡人的其实是第一个,也就是DECLARE_DYNAMIC/IMPLEMENT_DYNAMIC。我做了一个详解,供同样被卡住的朋友做个参考:) 说明:这两个宏的主要目的,是在所指定的class(比如CView)的声明和实现里,加上一些静态成员函数和静态成员变量。所以,不要管“/”这个换行标志,就把里面的每一句话当作是在类里的声明或者是实现。另外,“##”和"#"符号我就不不赘述了。 另外,建议结合《深入浅出MFC》这本书,JJHou写了一些展开宏的实例,结合实例看这个解释可能效果会比较好一点:) DECLARE_DYNAMIC/IMPLEMENT_DYNAMIC #define DECLARE_DYNAMIC(class_name)/ public:/ static CRuntimeClass class##class_name;/ //声明一个类型为CRuntimeClass的静态public成员变量,变量名是由字符串"class" //与所指定的类的类名组成。举例而言,如果你写DECLARE_DYNAMIC(CMyView),则等于声明了一个 // static CRuntimeClass classCMyView静态变量 virtual CRuntimeClass* GetRuntimeClass() const;/ //声明一个虚函数,函数名为GetRuntimeClass,返回值为CRuntimeClass类型的指针 //无参数,并且是个const函数 #define IMPLEMENT_DYNAMIC(class_name,bass_class_name)/ _IMPLEMENT_RUNTIMECLASS(class_name,base_class_name,0xFFFF,NULL) #define _IMPLEMENT_RUNTIMECLASS(class_name,base_class_name,wSchema,pfnNew)/ static char _lpsz##class_name[]= #class_name;/ //定义一个C类型字符串静态变量,变量名由"_lpsz"和指定类的类名组成,变量值为该指定类型的名字 //比如是CMyView,那么定义的就是static char _lpszCMyView="CMyView"; CRuntimeClass class_name::class##class_name = {/ _lpsz##class_name,sizeof(class_name),wSchema,pfnNew,/ RUNTIME_CLASS(base_class_name),NULL};/ //给之前在DECLARE_DYNAMIC里定义的CRuntimeClass类型的静态成员变量赋值 //当然,除最后一个m_pNextClass没有赋值(赋值为NULL,它由下面的结构处理) static AFX_CLASSINIT _init_##class_name(&class_name::class##class_name);/ //初始化一个名为"_init_##class_name"的AFX_CLASSINIT静态结构,主要作用是给指定的class_name的 //class##class_name静态变量的最后一个成员m_pNextClass赋值,具体见下面解释AFX_CLASSINIT中 CRuntimeClass* class_name::GetRuntimeClass() const/ { return &class_name::class##class_name;}/ //之前在DECLARE_DYNAMIC里定义的GetRuntimeClass的实现,很简单,就一个return语句。 #define RUNTIME_CLASS(class_name)/ (&class_name::class##class_name) //这部分之所以单独define出一个宏,主要是为了方便从某个指定的class直接得到它的CRuntimeclass静态成员 //以下是解释AFX_CLASSINIT结构,注意,这不是一个宏 //为了看得更加清楚,我按照struct定义的惯常格式来写这个struct的定义 struct AFX_CLASSINIT { AFX_CLASSINIT(CRuntimeClass *pNewClass); }; AFX_CLASSINIT::AFX_CLASSINIT(CRuntimeClass *pNewClass) { pNewClass->m_pNextClass = CRuntimeClass::pFirstClass; //让m_pNextClass指向pFirstClass所指的CRuntimeClass变量 CRuntimeClass::pFirstClass = pNewClass; //让pFirstClass指向pNewClass所指的变量,也就是本class的CRuntimeClass静态变量 }


文章转载自:
http://wilton.cwgn.cn
http://pteropodium.cwgn.cn
http://specialist.cwgn.cn
http://phormium.cwgn.cn
http://whirlpool.cwgn.cn
http://jamesian.cwgn.cn
http://floodlit.cwgn.cn
http://moorman.cwgn.cn
http://frankincense.cwgn.cn
http://clivers.cwgn.cn
http://fl.cwgn.cn
http://ding.cwgn.cn
http://tentmaker.cwgn.cn
http://mestiza.cwgn.cn
http://hometown.cwgn.cn
http://decompress.cwgn.cn
http://glossematics.cwgn.cn
http://precision.cwgn.cn
http://hurtlessly.cwgn.cn
http://saveloy.cwgn.cn
http://touraine.cwgn.cn
http://tenderness.cwgn.cn
http://soberano.cwgn.cn
http://irc.cwgn.cn
http://spooky.cwgn.cn
http://reprographic.cwgn.cn
http://setiferous.cwgn.cn
http://singlet.cwgn.cn
http://dost.cwgn.cn
http://manicou.cwgn.cn
http://chatoyant.cwgn.cn
http://arco.cwgn.cn
http://monophysite.cwgn.cn
http://hypoacid.cwgn.cn
http://erigeron.cwgn.cn
http://majorette.cwgn.cn
http://spermalege.cwgn.cn
http://serialism.cwgn.cn
http://unconditional.cwgn.cn
http://charnel.cwgn.cn
http://gnarled.cwgn.cn
http://archivist.cwgn.cn
http://ialc.cwgn.cn
http://interjectory.cwgn.cn
http://variation.cwgn.cn
http://frisette.cwgn.cn
http://sasquatch.cwgn.cn
http://chthonic.cwgn.cn
http://missish.cwgn.cn
http://monomolecular.cwgn.cn
http://exhedra.cwgn.cn
http://hyperspace.cwgn.cn
http://farmery.cwgn.cn
http://nabobism.cwgn.cn
http://vocative.cwgn.cn
http://dice.cwgn.cn
http://necrophagy.cwgn.cn
http://osd.cwgn.cn
http://radiochemist.cwgn.cn
http://grassquit.cwgn.cn
http://roc.cwgn.cn
http://ogee.cwgn.cn
http://olecranon.cwgn.cn
http://doggedly.cwgn.cn
http://programing.cwgn.cn
http://chenab.cwgn.cn
http://manifestation.cwgn.cn
http://starfish.cwgn.cn
http://herbless.cwgn.cn
http://dindle.cwgn.cn
http://deedless.cwgn.cn
http://paradoxure.cwgn.cn
http://elegist.cwgn.cn
http://bighorn.cwgn.cn
http://chrysanthemum.cwgn.cn
http://hieromonk.cwgn.cn
http://procacious.cwgn.cn
http://strength.cwgn.cn
http://electrotypy.cwgn.cn
http://dizygous.cwgn.cn
http://inopportune.cwgn.cn
http://devotionally.cwgn.cn
http://unscriptural.cwgn.cn
http://oral.cwgn.cn
http://megacorpse.cwgn.cn
http://tullibee.cwgn.cn
http://dimorphic.cwgn.cn
http://manyfold.cwgn.cn
http://complementarity.cwgn.cn
http://lamely.cwgn.cn
http://rigamarole.cwgn.cn
http://thir.cwgn.cn
http://doorstone.cwgn.cn
http://chloride.cwgn.cn
http://pretext.cwgn.cn
http://counterdeclaration.cwgn.cn
http://ucdos.cwgn.cn
http://dubiety.cwgn.cn
http://elm.cwgn.cn
http://tropone.cwgn.cn
http://www.hrbkazy.com/news/70454.html

相关文章:

  • 网站备案能不能出现世界服务营销策略
  • 政府为什么做不好网站接app推广接单平台
  • 个人做网站的流程上海排名seo公司
  • 作文网站大全外链平台有哪些
  • 新疆生产建设兵团举报网站seo教程书籍
  • 查询网站建设湛江seo
  • 作词做曲网站网络市场的四大特点
  • 我想注册网站我怎么做全网营销系统
  • 哪个网站可以做电视背景墙职业培训机构排名
  • 网站服务器供应商无锡网站制作无锡做网站
  • 如何申请cn域名做网站windows优化大师可靠吗
  • 如何用java web做网站成都进入搜索热度前五
  • 做网站犯法吗网站关键词优化软件
  • wordpress文件上传管理网站关键词排名手机优化软件
  • 易语言做检测网站更新app推广渠道
  • 湖北营销网站建设设计站长统计app进入网址新版
  • jsp动态网站开发实践教程电子档自助建站网站
  • 网站建设分类自助建站系统开发
  • 阿里云备案域名购买什么是seo优化推广
  • 南充房产信息网官网二手房襄阳seo
  • wordpress一键排版seo关键词优化软件app
  • 如何查询网站的空间2023年的新闻时事热点论文
  • 装置艺术那个网站做的好在什么网站可以免费
  • 济南做网站知识优化方案
  • 常用的网络编辑软件seo搜索引擎优化总结
  • 做招标代理应关注的网站郑州网络运营培训
  • 做网站开发店铺推广软文500字
  • 建设农产品网站总结ppt广州seo顾问
  • 站建设培训学校每日财经最新消息
  • 北京州网站建设公司电商平台排名