Modify Child Wnd Title Bar Caption in MDI App 
Author Message
 Modify Child Wnd Title Bar Caption in MDI App

Dear All,

I wish to modify the caption in the title bar of child windows in a MDI
application.

I have used

Wnd::SetWindowText("New Caption");

and I see that this is sending WM_SETTEXT messages.

However the child window title bar caption does not change
and the MFC default caption is displayed
(set by IDR_XXXXXXX in the CMultiDocTemplate constructor).

Any help greatly appreciated.

Jim.



Fri, 02 May 2003 03:00:00 GMT  
 Modify Child Wnd Title Bar Caption in MDI App

Quote:
>I wish to modify the caption in the title bar of child windows in a MDI
>application.

>I have used

>Wnd::SetWindowText("New Caption");

>and I see that this is sending WM_SETTEXT messages.

>However the child window title bar caption does not change
>and the MFC default caption is displayed
>(set by IDR_XXXXXXX in the CMultiDocTemplate constructor).

Jim,

MFC uses a special style FWS_ADDTOTITLE. If you remove this style from
the MDI frame window when it's created, MFC won't adjust the caption
text. YOu'd normally remove the style in the PreCreateWindow handler.
Have a look at Knowledge Base article Q99182 "HOWTO: Change an
MFC-Based MDI Child Window's Frame Text".

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sat, 03 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. MFC 2.5 MDI App-Child Wnd Titles

2. How to modify frame title of an MDI child at run time

3. Painting The Title Bar On MDI Child Window using OnNcPaint()

4. Change title of Child window in MDI app

5. Setting Title Bars in MDI App

6. Dynamically changing main window title bar for an MDI app

7. Change MDI child caption and Close child window button

8. Change MDI child caption and Close child window button

9. Is it possible to make top-level wnd of any app as child wnd of my app's wnd?

10. MDI Child Wnd, statusbar, scrollbar and list view as reportview

11. How can I set MDI child wnd invisible ?

12. docking windows in MDI Child Wnd

 

 
Powered by phpBB® Forum Software