Hi there,
I was wondering whether it's possible to change the Open button text in an Open File dialog box so that it will read something else i.e. something that gives the user a better idea of what the button does. Similarly, can it be done for a Save As dialog box. I have code below that displays an Open File dialog box and when the Open button is selected, a Save As dialog box appears. As I said already I would just like to change the text of the Open button and the Save As button. Thanks.
CFileDialog firstFile(TRUE, NULL, NULL, NULL, "All Files (*.*)|*.*||" );
CFileDialog tosaveFile(FALSE, NULL, NULL, NULL, "All Files (*.*)|*.*||" );
CString fileA;
CString fileB;
// Show the File open dialog and capture the result
if (firstFile.DoModal() == IDOK)
{
// Get the filename selected
fileA = firstFile.GetFileName();
// Update the dialog
UpdateData(FALSE);
if (tosaveFile.DoModal() == IDOK) {
fileB = tosaveFile.GetPathName(); UpdateData(FALSE);
}
//Do other stuff
}
I was wondering whether it's possible to change the Open button text in an Open File dialog box so that it will read something else i.e. something that gives the user a better idea of what the button does. Similarly, can it be done for a Save As dialog box. I have code below that displays an Open File dialog box and when the Open button is selected, a Save As dialog box appears. As I said already I would just like to change the text of the Open button and the Save As button. Thanks.
CFileDialog firstFile(TRUE, NULL, NULL, NULL, "All Files (*.*)|*.*||" );
CFileDialog tosaveFile(FALSE, NULL, NULL, NULL, "All Files (*.*)|*.*||" );
CString fileA;
CString fileB;
// Show the File open dialog and capture the result
if (firstFile.DoModal() == IDOK)
{
// Get the filename selected
fileA = firstFile.GetFileName();
// Update the dialog
UpdateData(FALSE);
if (tosaveFile.DoModal() == IDOK) {
fileB = tosaveFile.GetPathName(); UpdateData(FALSE);
}
//Do other stuff
}