By the time you get the unwanted prompt back, is your program still running or do you merely want to give an impression that it is running ?!
by default on Windows, as soon as you start a gui application it will give you back the command prompt as soon as the program starts running.
Have a look at GetExitCodeProcess. If the process has not terminated and the function succeeds, the status returned is STILL_ACTIVE.
Bookmarks