• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

Title to View

In my application (MDI) ther are several views to one document each one of the views needs to have a different name.
The problem is that when I use SetWindowText to change the title it changes whenever I Open a new document.
If I use SetTitle() I can give only one title to all the views of the document.
1 Solution
I didn't get you question properly, You may reject this answer  if you have already done this

BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
      return CMDIChildWnd::PreCreateWindow(cs);

void CMyView::OnInitialUpdate()

You  must override
void CMDIChildWnd::OnUpdateFrameTitle(BOOL bAddToTitle).
for example:
      // update our parent window first

      if ((GetStyle() & FWS_ADDTOTITLE) == 0)
            return;     // leave child window alone!

      CDocument* pDocument = GetActiveDocument();
      if (bAddToTitle && pDocument != NULL)
      //char szText[256];
      // here is your place to change text!
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.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now