?
Solved

How to Set a Title of CChildFrame window dynamically

Posted on 2004-08-31
5
Medium Priority
?
533 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
[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
5 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 252 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 248 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

Technology Partners: 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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

762 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