How to create/spawn Win32 process without mouse and keyboard focus and interaction?
Can some one mentioned most appropriate Win API function to create window process without having it display as top most window ,but stay behind in other opened windows?
(Assume you have to spawn/create a process of windowed(not fullscreen) Direct3D program executable and that program terminate by parent program therfore no need of user interaction but automated therefore when it gets created it should display behind other already opened windows).
Starting a process with a inactive SW_* value is not enough but if you are the foreground window you can also call
LockSetForegroundWindow
to disableSetForegroundWindow
:If your application does not need
SetForegroundWindow
then you don't have to unlock but it is probably a good idea to do so anyway: