Solved

Control of an MDI app title bar

Posted on 1998-04-06
2
308 Views
Last Modified: 2013-11-20
I'd like to manage the contents of my MDI app's title bar; I use SetWindowText to change it, however, as soon as I focus on another child window, the framework changes the titlebar back to the default app Name.  I know I need to override a message, and I've tried, Set & KillFocus, EraseBkgd, and Paint, to no avail.  How can I either a) prevent MFC from tampering with my app's title bar all together, or b) override the tampering to change to the text that I would like?  The text is dynamic and changes with the state of the program.
0
Comment
Question by:krw
[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
2 Comments
 
LVL 7

Accepted Solution

by:
galkin earned 20 total points
ID: 1317474
Name of the document is added to frame window title id frame has style FWS_ADDTOTITLE. This is MFC style. To remove it override frame's PreCreateWindow and delete it.

BOOL CMainFrame::PreCreateWindow( CREATESTRUCT& cs )
{
cs.style &=~FWS_ADDTOTITLE;
return CFrameWnd::PreCreateWindow( cs );
}
0
 

Author Comment

by:krw
ID: 1317475
Thanks!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.

733 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