Run Program Within Program?

Ok, the title sucked, but whatever.

In HTML we have the <iframe> which allows us to show a web page within a we page.
I was wondering if it's possible to have a similar thing in a WinAPI program, like if I wanted to have Dev-C++ running inside the main window of my program, like an <iframe>.

Is it possible to implement this with WinAPI?
HTML is an output format hence no analogy to a program.

If you want a analogy you will find it in class/namespace hierarchy.

Is it possible to implement this with WinAPI?

You can however start another program from inside your progam (which runs of course independent).
if you can program in win32 , then create a window within another window . Create two threads one for each.
Two threads ? Every win32 guidelines advises you against doing that and using only one thread for graphical interface, no matter how many windows your program has.
How about window message hooks?
@modoran , yes I should have said one for graphic and one for updates.
There are various ways to run another program from within your own. Most of the good ones are compiler dependant, so best research your help files before going too far
This example assumes the program you want to execute
* is called child.exe, and resides in the same
* directory as this program

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

int main()
char child1[] = "child.exe";
char child2[BUFSIZ];

* Execute by passing the name directly
system ("child.exe");

* Execute by passing an array name
system (child1);

* Build a buffer, and execute the commands within it
strcpy (child2, "child.exe");
strcat (child2, " -aparm -b");

printf ("Executing %s\n", child2);
system (child2);

return 0;

* Program output:
I am the child
I am the child
Executing child.exe -aparm -b
I am the child
Arg 1 -aparm
Arg 2 -b
Hi dwarak17,
My question actually refers to running a program within the GUI of another. Like running MS Word within a cell in MS Excel. Not starting a program using cmd commands within a console program.
Topic archived. No new replies allowed.