也谈向Richedit插入动态Gif的实现

最近在做IM软件,需要实现向Richedit插入表情,表情是动态的GIF图像。

由于以前没有做过关于richedit的开发,百度了下,需要使用OLE技术。也就是说,插入的图片都是一个OLE对象。而RICHEDIT则是一个OLE容器,相关链接如下。

How to insert a bitmap into an RTF document using the RichEdit control in Visual C++ 6.0
http://support.microsoft.com/default.aspx?scid=kb;en-us;220844

Animated Emoticons like those in MSN Messenger(英文版)
http://www.codeproject.com/KB/edit/AnimatedEmoticon.aspx

Animated Emoticons like those in MSN Messenger(中文版)
http://blog.csdn.net/dTianx/archive/2004/11/17/184949.aspx

DynamicGif作者blog
http://blog.csdn.net/kql01

阅读全文 » - 日期: 2009-05-26 7 条评论 » 点击: 207 views

探究 LoadImage 内部的图像缩放函数

最近研究界面编程涉及到了位图缩放。但发现系统提供的 StretchDIBits 缩放效果很不理想。但又研究发现 LoadImage 这个 API 内部实现了缩放功能。下面是 LoadImage 原型。

HANDLE LoadImage(
    HINSTANCE hinst,  // handle of the instance that contains the image
    LPCTSTR lpszName, // name or identifier of image
    UINT uType, // type of image
    int cxDesired, // desired width
    int cyDesired, // desired height
    UINT fuLoad // load flags
   );
设置此函数的 cxDesired cyDesired 参数实现缩放,效果较好。但是这个函数只能从文件或资源中获取位图。不方便用于已读入内存的位图。

而 StretchDIBits 可以实现但是效果又不理想。这使我有了研究 LoadImage 内部的冲动…… -_-!

阅读全文 » - 日期: 2009-05-26 暂无评论 » 点击: 32 views

Hello world!

从今天开始我也加入blog阵营啦

使用WordPress程序

欢迎大家常来玩

嘿嘿~

阅读全文 » - 日期: 2009-05-25 6 条评论 » 点击: 33 views