How to Set a Title of CChildFrame window dynamically

hi ,

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

Anybody help me ?

Regards,
Ramana
surekaAsked:
Who is Participating?
 
AlexFMConnect With a Mentor Commented:
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
 
surekaAuthor Commented:
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
 
Nass89Connect With a Mentor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.