CFileDialog !

Hi,
I want to change the caption SAVE of Save As Dialog to say "Guru".How will I achieve it ?Mine is a Dialog based application.

Here is the code I have written:

CMyFileDialog dlg(FALSE);

In the oninitdialog method of MyFileDialog I have written :

CWnd* pWnd = GetPArent();
CWnd* pChild = pWnd->GetDlgItem(IDOK);
pChild->SetWindowText("Guru");

Pls help me out to sort this problem.
gurukg102498Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
tvanceplusConnect With a Mentor Commented:
before you call DoModal() for your dlg object, insert the statement

dlg.m_ofn.lpstrTitle="Guru";

That should work for you.

Good Luck!

tvanceplus
0
 
ShaunWildeCommented:
I am unsure as to why you are asking for the parent window? Have you tried

CWnd* pChild = GetDlgItem(IDOK);
pChild->SetWindowText("Guru");

0
 
proskigCommented:
Sorry, if you want to change caption of a dialog, why do you call GetDlgItem(IDOK)???
0
 
ShaunWildeCommented:
> Sorry, if you want to change caption of a dialog, why do you call GetDlgItem(IDOK)

that's true - I thought he meant the button

0
 
tvanceplusCommented:
I think he means the dialog, but I could be wrong.

to gurukg

please, in the future, make your questions very specific and descriptive. This will help others give you the information you need.

tvanceplus
0
All Courses

From novice to tech pro — start learning today.