I'm using CreateProcess to spawn an MS-DOS-based application from
within a Win32 program. When the DOS app terminates, the window in
which it ran remains open on the screen until the user clicks the
close button. If the user clicks on the properties button on the
toolbar, there is a check box for "close on exit" which, when checked,
causes the window to go away automatically when the DOS app
terminates. Unfortunately, the default seems to be to have this box
unchecked, forcing the user to manually dismiss the remnants of the
DOS app every time it is run unless they remember to set the
properties. I also noticed that, once the properties are set, Windows
"remembers" the fact that the DOS app should close its window on exit,
and the window will close on all future invocations.
My questions: Is there some way to force the spawned DOS app to close
its window after termination directly from the CreateProcess
parameters? If not, where are the properties for this DOS app stored,
and how can my Win32 app access them directly in order to set the
"close on exit" flag?
Thanks for your help!