While my program is running, and the user click on a button, how do I make it to create a new instance of the program? So then there will be two instances of my program running at the same time.
While my program is running, and the user click on a button, how do I make it to create a new instance of the program? So then there will be two instances of my program running at the same time.
you mean click a button in your program and a new instance runs?
look into spawn*() functions?
ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.
There are quite a few ways of doing this. The faq kinda delves into this subject. But if you need control over the new instance of the process you'll want to use CreateProcess(). Otherwise, ShellExecute() will do what you want.
Yes, I've tried the ShellExecute() function to execute my program, and it worked quite well. However, since my program is a text editor, whenever I load a new text file, it cannot execute the program because it's in a different directory.
GetCurrentDir();
ShellExecute...