silvercircle/github/io
A Jekyll test site with no particular purpose.

Warning

This is an old archived article. It is here for historical and nostalgic reasons only. The software described in this article (Miranda IM and its components) is no longer a project I'm working on. The article most likely will contain broken links, missing images as it was automatically converted from an old blog long gone.

The project is still an active Open Source project and should you be interested, more information about it is available here.

Embedding flash content in Miranda

Embedding flash movies in normal C or C++ applications is quite straightforward as long as you know how to use COM objects in your code. The flash player is such a control and can be embedded in any application which has been made ready to use COM objects.

In theory, it could be done in plain C/Win32, but it is much easier to do it with MFC or ATL. The additional C++/MFC overhead doesn't mean much as we are talking about embedding a rather big COM object anyway, so embedding the flash player will certainly increase the memory footprint of Miranda significantly. But, you know, everything has its price tag..

The example code doesn't do much. It creates a new frame on the contact list and will play a flash movie inside this frame. To run this plugin, you need a multiwindow-enabled contact list, like clist_mw, clist_modern or clist_nicer+ (that means, this plugin will *not* work on clist_classic).

Some limitations of this example code:

Don't use *HUGE* flash movies, because they will most likely slow down your miranda too much. I tested it with some smaller animations and it didn't affect performance too much. It may, however, cause a delay when loading miranda, because the plugin has to load the flash player control. This delay is worst when Windows has to load the flash object for the first time - it could really slow down Mirandas startup process by a couple of seconds, depending on the speed of your machine.

To solve this problem, multithreading will be useful, but this will make things more complex and since this is only an example and not a really useful plugin, I don't care about these limitations *at the moment*. I will think about a better solution for embedding a flash control when I can find a useful reason to do so (one might be the possibility to play flash avatars in the message window).