设计模式-观察者模式 基于MFC实现的消息监听机制

上传者: gatescz | 上传时间: 2021-08-31 21:20:01 | 文件大小: 57KB | 文件类型: RAR
基于MFC实现的消息监听机制,利用了设计模式中的观察者模式,对线程间的同步做了优化,以及可以选择消息的发送类型:同步或异步发送。对于监听者而言在注册监听的同时可以选择监听的消息类型,避免了发送者发送的所有消息都会收到;对于发送者而言,无需关心监听消息的是谁。

文件下载

资源详情

[{"title":"( 34 个子文件 57KB ) 设计模式-观察者模式 基于MFC实现的消息监听机制","children":[{"title":"TestNotify","children":[{"title":"TestNotify.suo <span style='color:#111;'> 43.00KB </span>","children":null,"spread":false},{"title":"release","children":null,"spread":false},{"title":"debug","children":null,"spread":false},{"title":"TestNotify","children":[{"title":"TestNotify.aps <span style='color:#111;'> 58.92KB </span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 2.75KB </span>","children":null,"spread":false},{"title":"LisenterDialo2.cpp <span style='color:#111;'> 2.73KB </span>","children":null,"spread":false},{"title":"Release","children":null,"spread":false},{"title":"TestNotifyDlg.cpp <span style='color:#111;'> 5.02KB </span>","children":null,"spread":false},{"title":"TestNotifyDlg.h <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"TestNotify.rc2 <span style='color:#111;'> 366B </span>","children":null,"spread":false},{"title":"TestNotify.ico <span style='color:#111;'> 21.12KB </span>","children":null,"spread":false}],"spread":true},{"title":"NotifyBase.cpp <span style='color:#111;'> 6.52KB </span>","children":null,"spread":false},{"title":"Dialog3.h <span style='color:#111;'> 433B </span>","children":null,"spread":false},{"title":"NotifyBase.h <span style='color:#111;'> 1.46KB </span>","children":null,"spread":false},{"title":"LisenterDialo1.cpp <span style='color:#111;'> 2.82KB </span>","children":null,"spread":false},{"title":"stdafx.h <span style='color:#111;'> 2.43KB </span>","children":null,"spread":false},{"title":"TestLisenter.cpp <span style='color:#111;'> 484B </span>","children":null,"spread":false},{"title":"TestNotify.cpp <span style='color:#111;'> 1.66KB </span>","children":null,"spread":false},{"title":"LisenterDialo2.h <span style='color:#111;'> 867B </span>","children":null,"spread":false},{"title":"TestNotify.rc <span style='color:#111;'> 7.16KB </span>","children":null,"spread":false},{"title":"TestBase.h <span style='color:#111;'> 181B </span>","children":null,"spread":false},{"title":"Debug","children":null,"spread":false},{"title":"stdafx.cpp <span style='color:#111;'> 141B </span>","children":null,"spread":false},{"title":"INotifyLisenter.cpp <span style='color:#111;'> 238B </span>","children":null,"spread":false},{"title":"resource.h <span style='color:#111;'> 1.02KB </span>","children":null,"spread":false},{"title":"TestNotify.vcproj <span style='color:#111;'> 6.53KB </span>","children":null,"spread":false},{"title":"TestLisenter.h <span style='color:#111;'> 447B </span>","children":null,"spread":false},{"title":"INotifyLisenter.h <span style='color:#111;'> 243B </span>","children":null,"spread":false},{"title":"LisenterDialo1.h <span style='color:#111;'> 889B </span>","children":null,"spread":false},{"title":"TestNotify.vcproj.WORK33067-1.dy.user <span style='color:#111;'> 1.39KB </span>","children":null,"spread":false},{"title":"TestNotify.h <span style='color:#111;'> 465B </span>","children":null,"spread":false},{"title":"INotify.cpp <span style='color:#111;'> 108B </span>","children":null,"spread":false},{"title":"INotify.h <span style='color:#111;'> 362B </span>","children":null,"spread":false},{"title":"INotifyMSG.cpp <span style='color:#111;'> 314B </span>","children":null,"spread":false},{"title":"Dialog3.cpp <span style='color:#111;'> 792B </span>","children":null,"spread":false},{"title":"TestBase.cpp <span style='color:#111;'> 256B </span>","children":null,"spread":false},{"title":"INotifyMSG.h <span style='color:#111;'> 582B </span>","children":null,"spread":false}],"spread":false},{"title":"TestNotify.sln <span style='color:#111;'> 895B </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • lfphcl :
    写的很好,对面试什么的很有帮助。要是每种设计模式都有例子就好了!
    2017-05-20
  • suipian20120405 :
    感觉稍微有点乱,没怎么看懂,
    2015-10-25
  • riri654123 :
    最好能能多一点DEMO
    2013-11-06
  • ccaccbccc :
    写的不错,工作中叶可以借鉴一下
    2013-04-08
  • paron717 :
    写的不错 很详细
    2013-01-06

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明