Solved

CFileDialog !

Posted on 2000-05-04
5
312 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
  • 2
  • 2
5 Comments
 
LVL 9

Expert Comment

by:ShaunWilde
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
> 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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Question regarding Copy/Paste 16 86
if loop in java 3 114
fizzArray  challenge 1 47
wait notify demo infinite loop 3 80
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now