In Visual C++ 6.0, I call:
HINSTANCE hInst = ShellExecute(NULL, NULL, sLaunch, sParams, NULL, SW_SHOWNORMAL);
where sLaunch is the fully qualified path to the executable, and sParams are command line params.
This works, the application runs as it should. The problem is that sometimes the app loads, but it's not got focus - its icon in the windows taskbar is flashing.. Other times, it actually loads and comes to the front as it should.
How can I force the launched application to come up to the front so the user doesn't then have to recognize there is a flashing icon in the footer and click it?
My platforms of concern are XP Pro, and Win7