On Windows, (using C++, in case it matters):
From a GUI application A I use CreateProcess to start up an external GUI application B.
It seems that Windows automatically brings the newly started program B to front (i.e. topmost window). I would like to suppress this behavior so that B's windows are not moved to front - instead they simply should stay behind the windows of program A.
I discovered that CreateProcess accepts a STARTUPINFO where you can specify wShowWindow in connection with STARTF_USESHOWWINDOW. However, even specifying SW_SHOWNOACTIVATE or SW_SHOWNA does not keep the window in background - the window is not activated, but still comes to front.
TLRD Is there a way to start an external GUI application so that the newly started program does not come to front?