MFC解决窗口保存及重绘闪烁问题的一种比较好的方案 v1.0.5

上传者: dungeonsnd | 上传时间: 2010-07-24 00:00:00 | 文件大小: 1.05MB | 文件类型: rar
包含文件说明: 1. SolveFlashingAndRedrawv1.0.5 纯净版 无闪烁的MFC应用框架,实际使用时把此工程改名成你要建立的项目名称,然后开始开发即可。你熟悉MFC的话研究这个框架的半个小时应该就明白并熟练运用了。 2.SolveFlashingAndRedrawv1.0.5 demo版 利用SolveFlashingAndRedrawv1.0.4框架写的一个示例小程序,主要展示框架要实现的优点特性。 3.VCRn 修改vc工程名工具 ___作者 田彬.exe 用网上找到的一个MFC改工程名称的小工具,很实用。如果你想使用本框架就可以用它来改成你想要的工程名了。 4. 未使用本框架的类似功能简化程序 没有使用框架的程序,实现的功能和Demo类似。但是运行之后改变窗口大小等,会发现图形闪烁很厉害! 5. SolveFlashingAndRedrawv1.0.5 demo版 运行截图.jpg 6. ReadMe.txt 说明文件。 补充说明: 工程使用vc6.0开发,如果你用vc6.0双击.dsw文件无法打开,请先打开vc6.0然后把.dsw拖动到vc上面。 如果这种方法还是无法打开,你新建一个vc6.0 mfc sdi程序,把示例中框架拷贝到这个新工程中,运行即可,代码量不是太多。 框架说明: /****************************************************** SolveFlashingAndRedraw框架说明 ******************************************************/ /** 项目名称: demo框架 版本号: v1.0.5 第一作者: Jef 地址: 中国/江苏 日期: 20100724 电子邮箱: dungeonsnd@126.com 版权: 1.您可以修改及免费使用本程序。 2.修改之后附上您的个人信息发送到上面的作者邮箱,作者负责在全面测试后发布您修改后的新版本。 3.您使用本程序而导致任何伤害以及经济损失,由过错方依法承担所有责任,一概与第一作者及合作单位无关。 4.如果您使用本程序则表示您已经同意此版本协议!否则请勿使用! 项目功能: SolveFlashingAndRedraw框架是MFC解决窗口保存及重绘闪烁问题的一种比较好的方案(Win32解决方法类似)。 版本历史: v1.0.1 20091126 第一版本 v1.0.2 20091212 第二版本 1. 修改了部分变量的名字使其更符合其意义 2. 增加为两个工程,一是带demo例子的,另一是不带demo的纯净版. 3. 修改了其中一个错误. 如 CreateCompatibleDC之后没有调用DeleteDC等. v1.0.3 对v1.0.2进行了整理 v1.0.4 20100416 在v1.0.3的基础上进行整理,并增加了裁剪区,提高了绘图效率! v1.0.5 20100724 1. 添加了一个工具类CMemBmpDc,帮助产生一个内存DC,并把指定的内存位图选进去。方便绘图。 2. 演示了在适当时机如何高效画图,见Demo版的DrawSinwave(bool bDrawOnScreen)函数。 演示了用两种方法来绘图, 方法1. 直接绘图到屏幕上, 同时绘图到内存位图上,内存位图不会立即贴到屏幕上减少了内存拷贝的时间,提高了效率, 将来窗口失效时OnPait贴图到屏幕上. 这种方法的优点时减小了不必要的内存拷贝,缺点时当绘图内存复杂并且非常耗时可能会导致闪烁。 故适用于像本Demo的这样绘图(本例函数只绘制一小段直线)。 方法2. 绘制到内存位图上后把应该重绘的这一小块设成裁剪区,然后立即OnPait重绘这个裁剪区。 运行步骤: 直接运行demo里面的程序,在窗口上任意拖拉鼠标画线,然后点击菜单栏的几个示范菜单项,然后移动窗口、 改变窗口大小、最大最小化窗口、用其它窗口覆盖此窗口、鼠标放到任务栏。。。 以上种种操作观察窗口内的图像变化。可以发现窗口内图像几乎看不到闪烁,而且窗口的元素已经保存下来重绘时任然可以看到图像。 如何使用: 进行项目开发时,可以先建立项目,然后把本解决方案框架拷贝到新建项目中即可。 也可以自己根据需要修改纯净版。 其它: 友情提示,小心 View类头文件及View类的实现文件中有说明,使用时别把它弄到你实际项目里哦! 进行大量复杂的图形的输出,而且对效率要求特别高

文件下载

资源详情

[{"title":"( 82 个子文件 1.05MB ) MFC解决窗口保存及重绘闪烁问题的一种比较好的方案 v1.0.5","children":[{"title":"SolveFlashingAndRedraw框架 v1.0.5","children":[{"title":"SolveFlashingAndRedrawv1.0.5 demo版 运行截图.jpg <span style='color:#111;'> 149.67KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedrawv1.0.5 demo版 运行视频.avi <span style='color:#111;'> 8.41MB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedrawv1.0.5 纯净版","children":[{"title":"SolveFlashingAndRedraw.aps <span style='color:#111;'> 28.52KB </span>","children":null,"spread":false},{"title":"StdAfx.cpp <span style='color:#111;'> 224B </span>","children":null,"spread":false},{"title":"MemBmpDc.cpp <span style='color:#111;'> 1.27KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.h <span style='color:#111;'> 1.50KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.ncb <span style='color:#111;'> 49.00KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedrawDoc.h <span style='color:#111;'> 1.61KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.cpp <span style='color:#111;'> 4.39KB </span>","children":null,"spread":false},{"title":"MainFrm.h <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.rc <span style='color:#111;'> 10.52KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.dsp <span style='color:#111;'> 4.90KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedrawDoc.cpp <span style='color:#111;'> 2.01KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.plg <span style='color:#111;'> 278B </span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 4.58KB </span>","children":null,"spread":false},{"title":"StdAfx.h <span style='color:#111;'> 1.03KB </span>","children":null,"spread":false},{"title":"MemBmpDc.h <span style='color:#111;'> 505B </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.exe <span style='color:#111;'> 116.13KB </span>","children":null,"spread":false},{"title":"MainFrm.cpp <span style='color:#111;'> 2.46KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.dsw <span style='color:#111;'> 569B </span>","children":null,"spread":false},{"title":"Resource.h <span style='color:#111;'> 510B </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.clw <span style='color:#111;'> 2.41KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedrawView.cpp <span style='color:#111;'> 4.61KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"SolveFlashingAndRedraw.ico <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedrawDoc.ico <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.rc2 <span style='color:#111;'> 414B </span>","children":null,"spread":false},{"title":"Toolbar.bmp <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false}],"spread":false},{"title":"SolveFlashingAndRedrawView.h <span style='color:#111;'> 2.27KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.opt <span style='color:#111;'> 52.50KB </span>","children":null,"spread":false}],"spread":false},{"title":"SolveFlashingAndRedrawv1.0.5 demo版","children":[{"title":"SolveFlashingAndRedraw.aps <span style='color:#111;'> 29.32KB </span>","children":null,"spread":false},{"title":"StdAfx.cpp <span style='color:#111;'> 224B </span>","children":null,"spread":false},{"title":"resource.h <span style='color:#111;'> 750B </span>","children":null,"spread":false},{"title":"MemBmpDc.cpp <span style='color:#111;'> 1.27KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.h <span style='color:#111;'> 1.50KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.ncb <span style='color:#111;'> 105.00KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedrawDoc.h <span style='color:#111;'> 1.61KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.cpp <span style='color:#111;'> 4.39KB </span>","children":null,"spread":false},{"title":"MainFrm.h <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.rc <span style='color:#111;'> 11.86KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.dsp <span style='color:#111;'> 4.90KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedrawDoc.cpp <span style='color:#111;'> 2.01KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.plg <span style='color:#111;'> 1.96KB </span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 4.58KB </span>","children":null,"spread":false},{"title":"StdAfx.h <span style='color:#111;'> 1.03KB </span>","children":null,"spread":false},{"title":"MemBmpDc.h <span style='color:#111;'> 505B </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.exe <span style='color:#111;'> 40.00KB </span>","children":null,"spread":false},{"title":"MainFrm.cpp <span style='color:#111;'> 2.46KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.dsw <span style='color:#111;'> 569B </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.clw <span style='color:#111;'> 2.58KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedrawView.cpp <span style='color:#111;'> 18.99KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"SolveFlashingAndRedraw.ico <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedrawDoc.ico <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.rc2 <span style='color:#111;'> 414B </span>","children":null,"spread":false},{"title":"Toolbar.bmp <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false}],"spread":false},{"title":"SolveFlashingAndRedrawView.h <span style='color:#111;'> 11.02KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.opt <span style='color:#111;'> 52.50KB </span>","children":null,"spread":false}],"spread":false},{"title":"VCRn 修改vc工程名工具 ___作者 田彬.exe <span style='color:#111;'> 220.00KB </span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 8.41KB </span>","children":null,"spread":false},{"title":"未使用本框架的类似功能简化程序","children":[{"title":"SolveFlashingAndRedraw.aps <span style='color:#111;'> 44.30KB </span>","children":null,"spread":false},{"title":"StdAfx.cpp <span style='color:#111;'> 224B </span>","children":null,"spread":false},{"title":"resource.h <span style='color:#111;'> 750B </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.h <span style='color:#111;'> 1.50KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedrawDoc.h <span style='color:#111;'> 1.61KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.cpp <span style='color:#111;'> 4.39KB </span>","children":null,"spread":false},{"title":"MainFrm.h <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.rc <span style='color:#111;'> 11.76KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.dsp <span style='color:#111;'> 4.78KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedrawDoc.cpp <span style='color:#111;'> 2.01KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.plg <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 4.58KB </span>","children":null,"spread":false},{"title":"StdAfx.h <span style='color:#111;'> 1.03KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.exe <span style='color:#111;'> 120.13KB </span>","children":null,"spread":false},{"title":"MainFrm.cpp <span style='color:#111;'> 2.46KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.dsw <span style='color:#111;'> 569B </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.clw <span style='color:#111;'> 2.55KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedrawView.cpp <span style='color:#111;'> 6.48KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"SolveFlashingAndRedraw.ico <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedrawDoc.ico <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.rc2 <span style='color:#111;'> 414B </span>","children":null,"spread":false},{"title":"Toolbar.bmp <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false}],"spread":false},{"title":"SolveFlashingAndRedrawView.h <span style='color:#111;'> 2.52KB </span>","children":null,"spread":false},{"title":"SolveFlashingAndRedraw.opt <span style='color:#111;'> 52.50KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}]

评论信息

  • mh345510120 :
    不错,写的很详细
    2019-08-02
  • gbaps2 :
    谢谢了,挺好的
    2016-09-02
  • liyongjj :
    非常好的资料,感谢。
    2016-03-08
  • a1989318m :
    只能学习参考了 跟我这边有点不同
    2015-06-16
  • 小猪飞剑 :
    还不错,有参考意义
    2015-05-12

免责申明

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