Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Title to View

Posted on 1999-07-27
Medium Priority
Last Modified: 2013-11-20
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.
Question by:Anonimus
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

Accepted Solution

VCGuru earned 200 total points
ID: 1311603
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()

LVL 12

Expert Comment

ID: 1311604
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!

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

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 …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

688 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