I take users through a series of calculations with FORTRAN modules using a PB/CC menu application that also provides utilities to process input and output files. The utilities, all PB/CC modules, are invoked by shelling from the menu application. The console of one utility needs to be larger than the default size of the parent console and it includes the statement ShowWindow hWnd&, %SW_MAXIMIZE to avoid scroll bars. This works as desired the first time the utility is invoked but not on subsequent attempts.
MSDN indicates that the second parameter of the ShowWindow function "is ignored the first time an application calls ShowWindow, if the program that launched the application provides a STARTUPINFO structure. Otherwise, the first time ShowWindow is called, the value should be the value obtained by the WinMain function in its nCmdShow parameter". In subsequent calls, the parameter can be %SW_MAXIMIZE among others. My observations would suggest that on subsequent shellings the parameter is ignored and the console is not displayed as its initial matter.
Is their some means to obtain a consistent console (maximized) upon subsequent shellings? How do I set the nCmdShow parameter of the
WinMain function prior to shelling to child? Can the parent provide the STARTUPINFO for a child? Suggestions welcomed and examples appreciated by a physicist who programs out of necessity.
MSDN indicates that the second parameter of the ShowWindow function "is ignored the first time an application calls ShowWindow, if the program that launched the application provides a STARTUPINFO structure. Otherwise, the first time ShowWindow is called, the value should be the value obtained by the WinMain function in its nCmdShow parameter". In subsequent calls, the parameter can be %SW_MAXIMIZE among others. My observations would suggest that on subsequent shellings the parameter is ignored and the console is not displayed as its initial matter.
Is their some means to obtain a consistent console (maximized) upon subsequent shellings? How do I set the nCmdShow parameter of the
WinMain function prior to shelling to child? Can the parent provide the STARTUPINFO for a child? Suggestions welcomed and examples appreciated by a physicist who programs out of necessity.
Comment