Solved

CFileDialog !

Posted on 2000-05-04
5
325 Views
Last Modified: 2013-11-20
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.
0
Comment
Question by:gurukg102498
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2777510
I am unsure as to why you are asking for the parent window? Have you tried

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

0
 
LVL 5

Expert Comment

by:proskig
ID: 2778050
Sorry, if you want to change caption of a dialog, why do you call GetDlgItem(IDOK)???
0
 
LVL 1

Accepted Solution

by:
tvanceplus earned 50 total points
ID: 2778389
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
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2779877
> 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
 
LVL 1

Expert Comment

by:tvanceplus
ID: 2781015
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question