[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to Set a Title of CChildFrame window dynamically

Posted on 2004-08-31
5
Medium Priority
?
544 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

650 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