Link to home
Start Free TrialLog in
Avatar of gurukg102498
gurukg102498

asked on

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.
Avatar of ShaunWilde
ShaunWilde

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

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

Sorry, if you want to change caption of a dialog, why do you call GetDlgItem(IDOK)???
ASKER CERTIFIED SOLUTION
Avatar of tvanceplus
tvanceplus

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> 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

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