[try Beta version]
Not logged in

 
Run Program Within Program?

Sep 6, 2015 at 2:20pm
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?
Sep 10, 2015 at 12:23pm
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?
No.

You can however start another program from inside your progam (which runs of course independent).
Sep 10, 2015 at 12:55pm
if you can program in win32 , then create a window within another window . Create two threads one for each.
Sep 12, 2015 at 7:59am
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.
Sep 12, 2015 at 4:50pm
How about window message hooks?
Sep 14, 2015 at 1:21pm
@modoran , yes I should have said one for graphic and one for updates.
Sep 20, 2015 at 7:18am
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
*
*/
http://www.trainingintambaram.in/android-training-in-chennai.html#
Sep 20, 2015 at 4:51pm
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.