Solved

How to Set a Title of CChildFrame window dynamically

Posted on 2004-08-31
5
511 Views
Last Modified: 2013-11-20
hi ,

Greetings!
I want to set Title of childFrame window dynamically.

Anybody help me ?

Regards,
Ramana
0
Comment
Question by:sureka
5 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 63 total points
ID: 11949569
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
    cs.style &= ~FWS_ADDTOTITLE;

    if( !CMDIChildWnd::PreCreateWindow(cs) )
        return FALSE;

    return TRUE;
}

Now you can set window title using SetWindowText in any place of the program.
0
 

Author Comment

by:sureka
ID: 11949590
hi Alex,

Thanks for reply,

I want to Set the Title of ChildFrame window, when one dialog button is clicked.
Please write sample code stuff.

Regards,
Sureka
0
 
LVL 5

Assisted Solution

by:Nass89
Nass89 earned 62 total points
ID: 11950419
Hi,

CDocument::SetTitle

SetTitle(_T(strNewTitle)) changes the title of  an MDI child.

If you want to change the title from a dialog. Define a member variable for CDocument class as m_Title and change it in dialog and use SetTitle in Document to change the title.

Good Luck!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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: 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 …
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

939 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

16 Experts available now in Live!

Get 1:1 Help Now