cplusplus.com cplusplus.com
cplusplus.com   C++ : Forums : Windows Programming : How to insert animated GIF into RichEdit...
  Search:
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forums
Forums
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Articles
Lounge
Jobs

-

post  How to insert animated GIF into RichEdit?

tedi
How to insert animated GIF into RichEdit?
|
Zaita
Please tell us what IDE, OS and Compiler you are using. This will make it easier to try and answer your query.
|
tedi
I use Windows OS, Visual Studio 2005 IDE.
I need to do this in WIN API.
|
Duoas
You must use the
EM_GETOLEINTERFACE message to obtain the RichEdit's IRichEditOle interface and the
EM_SETOLEINTERFACE message to register an IRichEditOleCallback interface that the control uses to obtain the Ole data.

There is a MS support page that addresses this very issue for a bitmap object at
http://support.microsoft.com/kb/220844

To do an animated GIF is much the same (you must decode the GIF into its component bitmaps, which is somewhat involved but not difficult, and you can get an actual GIF LZW decoder algorithm by searching the web; or you can find a library that does it for you...).

The main difference is that you will need to periodically update the bitmap displayed.

I've never done this myself, so I don't know of anyone who has... a little googling might get some useful tips.

Good luck.
| Last edited on

Registered users can reply in this forum.
Home page | Privacy policy
© cplusplus.com, 2000-2008 - All rights reserved - v2.2
Spotted an error? contact us