views:

581

answers:

3

hello,

I have a Windows desktop application that I want to add some functionality to. Unfortunately the source code is not available, but it has a COM API.

So, my desire is to embed this application in my own window (with menus, toolbar, etc) and link events through the COM API.

How do you suggest I embed one application within another? (I had intended to use the Qt toolkit but it only supports embedding applications on Linux.)

thanks, Richard

A: 

The purpose of COM is to allow the creation of components that could be used by various languages. Assuming your window will merely be a wrapper around the other application's COM API, the answer really depends on your own skills. Generally, if this is really the case I would say just choose the easiest language you know that supports GUI and COM. A good option would be VB - you have much less to worry about comparing to C++, and it works smoothly with COM. I believe using COM in C# is much easier than in C++ as well, and so is GUI creation. I'm not familiar with Qt, but if all you want is a wrapper app, I'd say C++ is not the easiest way to go (if you do have other options). Not for GUI creation, and definitively not for automation.

eran
hi, sorry I didn't phrase my question well. I've changed it now to make clear that my problem is how to embed one application within another. There are libraries for COM so I'm not worried about that.
Plumo
+1  A: 

You can use ActiveQt for this - which allows both embedding Qt components inside ActiveX clients as well as hosting ActiveX components inside Qt applications. See also

http://doc.trolltech.com/4.5/activeqt.html

Henrik Hartz
unfortunately the application I am trying to embed is not an ActiveX component. Additionally, ActiveQt is not available for the open source license.
Plumo
A: 

I'm not sure there is a good way in Windows. Perhaps you can have your new application be an 'always on top' window mostly transparent and match the sizing and positioning of the 'embedded' application. This is probably easiest done with .NET.

kenny
I was afraid of that...
Plumo