Add maximize=1/0 parameter to gui native viewer defs for opening maximized window on Windows

This commit is contained in:
Jean-Francois Dockes
2016-12-05 12:17:56 +01:00
parent 33e09df833
commit 80e356ffb2
4 changed files with 25 additions and 9 deletions
+7 -3
View File
@@ -764,15 +764,19 @@ int ExecCmd::startExec(const string &cmd, const vector<string>& args,
siStartInfo.cb = sizeof(STARTUPINFO);
if (m->m_flags & EXF_SHOWWINDOW) {
siStartInfo.dwFlags |= STARTF_USESTDHANDLES;
if (m->m_flags & EXF_MAXIMIZED) {
siStartInfo.dwFlags |= STARTF_USESHOWWINDOW;
siStartInfo.wShowWindow = SW_SHOWMAXIMIZED;
}
} else {
siStartInfo.dwFlags |= STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
// This is to hide the console when starting a cmd line command from
// the GUI. Also note STARTF_USESHOWWINDOW above
siStartInfo.wShowWindow = SW_HIDE;
}
siStartInfo.hStdOutput = hOutputWrite;
siStartInfo.hStdInput = hInputRead;
siStartInfo.hStdError = hErrorWrite;
// This is to hide the console when starting a cmd line command from
// the GUI. Also note STARTF_USESHOWWINDOW above
siStartInfo.wShowWindow = SW_HIDE;
char *envir = mergeEnvironment(m->m_env);