Solved

How to Set a Title of CChildFrame window dynamically

Posted on 2004-08-31
5
509 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

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

746 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

15 Experts available now in Live!

Get 1:1 Help Now