Solved

Control of an MDI app title bar

Posted on 1998-04-06
2
292 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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
NotAlone Challenge 20 84
mapBully challenge 6 152
wordmultiple challenge 12 140
Bartender label printing - switch on and off graphics 3 54
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: 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.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

791 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