Solved

Control of an MDI app title bar

Posted on 1998-04-06
2
302 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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
not able to insert into temp table 68 174
Replacement selected text 2 65
maxBlock challenge 30 145
has22 challenge 11 107
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.

756 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