Checking in a fix for the browse button not retaining the previous value when the open file dialog is cancelled.

This commit is contained in:
varada%netscape.com 1999-09-17 20:29:40 +00:00
Родитель 3447e0068a
Коммит 5e3aae808c
1 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -538,10 +538,17 @@ BOOL CWizardUI::OnCommand(WPARAM wParam, LPARAM lParam)
// This is to browse to a file
CFileDialog fileDlg(TRUE, NULL, NULL, OFN_OVERWRITEPROMPT, NULL, NULL);
int retVal = fileDlg.DoModal();
CString fullFileName="";
CString fullFileName = fileDlg.GetPathName();
WIDGET* editWidget = CurrentNode->pageWidgets[i-1];
((CEdit*)editWidget->control)->SetWindowText(fullFileName);
//Checking to see if the open file dialog did get a value or was merely cancelled.
//If it was cancelled then the value of the edit box is not changed.
if (fileDlg.GetPathName() != "")
{
fullFileName = fileDlg.GetPathName();
((CEdit*)editWidget->control)->SetWindowText(fullFileName);
}
}
else if (curWidget->action.function == "BrowseDir") {
// The following code is used to browse to a dir