From 5691564e80e26da63d3ba9b60ab4e51e651c828a Mon Sep 17 00:00:00 2001 From: "racham%netscape.com" Date: Thu, 17 Jun 1999 04:44:53 +0000 Subject: [PATCH] Fixed bug 4975 and enabled picking page titles from ini files git-svn-id: svn://10.0.0.236/trunk@35773 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/cck/driver/WizardUI.cpp | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/mozilla/cck/driver/WizardUI.cpp b/mozilla/cck/driver/WizardUI.cpp index cc346718165..913ed74ca1c 100644 --- a/mozilla/cck/driver/WizardUI.cpp +++ b/mozilla/cck/driver/WizardUI.cpp @@ -31,6 +31,8 @@ #include "NewConfigDialog.h" #include "ProgDlgThread.h" #include +#include +#include // The following is included to make // the browse for a dir code compile @@ -107,7 +109,9 @@ END_MESSAGE_MAP() BOOL CWizardUI::OnSetActive() { - if (!(CurrentNode->isWidgetsSorted)) { + (AfxGetMainWnd( ))->SetWindowText(CurrentNode->localVars->title); + + if (!(CurrentNode->isWidgetsSorted)) { SortWidgetsForTabOrder(); } @@ -379,6 +383,9 @@ BOOL CWizardUI::OnCommand(WPARAM wParam, LPARAM lParam) } strcat(commandList[commandListLength]," "); commandBuilt = TRUE; + + if (k+1 == numArgs) + commandListLength++; } else { @@ -479,7 +486,20 @@ BOOL CWizardUI::OnCommand(WPARAM wParam, LPARAM lParam) newEntry = FALSE; for (int listNum =0; listNum < commandListLength; listNum++) { - system(commandList[listNum]); + //system(commandList[listNum]); + STARTUPINFO startupInfo; + PROCESS_INFORMATION processInfo; + + memset(&startupInfo, '\0', sizeof(startupInfo)); + memset(&processInfo, '\0', sizeof(processInfo)); + + startupInfo.cb = sizeof(STARTUPINFO); + startupInfo.dwFlags = STARTF_USESHOWWINDOW; + startupInfo.wShowWindow = SW_SHOW; + + BOOL executionSuccessful = CreateProcess(NULL, commandList[listNum], NULL, NULL, TRUE, NORMAL_PRIORITY_CLASS, NULL, NULL, &startupInfo, &processInfo); + DWORD error = GetLastError(); + WaitForSingleObject(processInfo.hProcess, INFINITE); } theApp.GenerateList(tmpFunction, tmpWidget, tmpParams);