views:

58

answers:

3

Is it possible to host/embed/reparent a normal Windows Application into a web page loaded into Internet Explorer on our Intranet?

I'd like to do something like have the user press a button on our intranet site, and have the Windows application start and look like it's inside our application, as if it was "framed". I believe it's possible to do this with Windows applications that reparent other applications.

I'm happy to elevate permissions, use trusted sites, make it a HTA, and/or change the registry on the client machine if necessary as we have full control over the machines on our Intranet. This also only needs to work on Internet Explorer.

+1  A: 

Sounds like you want to write an ActiveX control.

jeffamaphone
I wonder if I could get an ActiveX control to start and reparent a windows app?
Matthew Lock
+1  A: 

To use ActiveX you need to modify the application to render to a different window handle. What language is your target application written in?

You need to change your application that it can be called with some parameters or as a dll with a window handle (one from internet explorer) as parameter. Your application instead of creating it's own window need to use the window handle from ie to render. Then you need to implement a simple ActiveX object that does nothing than to instanciate your application with the proper arguments.

David Feurle
The target application is C++.
Matthew Lock
and the GUI uses the Qt library
Matthew Lock
@matthew I did this once with QT - via the QT-MFC Solution I got the application to render on a native hWnd (one from windows explorer). For this project I would recommend ActiveQT. You could take a look at the simple example (X:\Qt\2010.04\qt\examples\activeqt\simple). This gives you a control that can be directly instanciated in the browswer. This could use the "main-control" from your application (if your application is available as a dll).
David Feurle
A: 

I've heard of embedding winforms into wpf, though I've never done it, this code project article claims to.

Gabriel