Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dialog query

Status
Not open for further replies.

macronin

Technical User
Jan 2, 2002
4
IE
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
}
 
Not a far as I know, but you might want to change the caption of the dialog by using the lpstrTitle member of the OPENFILENAME structure.

It's not what you want but it might ne better than nothing.

HTH
William
Software Engineer
ICQ No. 56047340
 
Nice one branko. Just what the doctor ordered.

:)

William
Software Engineer
ICQ No. 56047340
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top