How to run one executable inside another's client window space?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: How to run one executable inside another's client window space?

Hybrid View

  1. #1
    Join Date
    Feb 2001
    Posts
    342

    How to run one executable inside another's client window space?

    Is it possible to run an application inside another application's window space?

    For example, if I have fred.exe and I want to have it appear to run as a child window of wilma.exe, an MDI app, is this possible?

    One caveat - I write wilma.exe, but fred.exe is someone else's app and I can't modify it.

    What I'm trying to do is host another application's instance inside my application.

  2. #2
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,061
    Wilma is going to be picky about what kind of app fred is...

    If Fred is a console app, it should be fairly easy for wilma to use a pipe to capture the output from fred and display it in her own (console)window.. This is afterall a bit like how MSDev displays the output of the compiler/linker.

    If Fred is a GUI program, then it's still somewhat possible, although it'll require LOTS of work, since you'll have to trap all window creation and window messages, and pass them along from wilma to fred. Only recommended for ultra advanced programmers though. I started something along the lines of this myself a looong time ago, but was only able to get partial support for it working.
    Generally, you can safely safe that if fred doesn't provide for having itself run in a client window of another app (typically this would be done via OLE/Com/ActiveX), the effort for making it do that anyway, are probably not going to be worth it.

  3. #3
    Join Date
    Feb 2001
    Posts
    342

    I don't suppose there's an

    ActiveX control written for just this purpose?

    In other words, add an ActiveX control to a dialog (or CFormView, in my case) which would handle running the foreign app itself.

  4. #4
    Join Date
    Feb 2002
    Posts
    4,640
    I think OReubens means that fred.exe would be written to act as both a stand alone EXE, and as an ActiveX control.

    Viggy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center