Changing title bar text 
Author Message
 Changing title bar text

Hi.

How do I change the text in the title bar of an MFC SDI application?

Thanks!
John



Sat, 20 Apr 2002 03:00:00 GMT  
 Changing title bar text
 AfxGetMainWnd()->SetWindowText("New Title");

TFM3

Note: spam-resistant e-mail address

Quote:

>Hi.

>How do I change the text in the title bar of an MFC SDI application?

>Thanks!
>John



Sat, 20 Apr 2002 03:00:00 GMT  
 Changing title bar text
You also need to get rid of FWS_ADDTOTITLE style:

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

Quote:
}

or

ModifyStyle(FWS_ADDTOTITLE, 0);  // After PreCreateWindow has been called.

--
Ajay Kalra

Microsoft VC++ MVP



Quote:
> AfxGetMainWnd()->SetWindowText("New Title");

> TFM3

> Note: spam-resistant e-mail address


> >Hi.

> >How do I change the text in the title bar of an MFC SDI application?

> >Thanks!
> >John



Sat, 20 Apr 2002 03:00:00 GMT  
 Changing title bar text
Look at CDocument.SetTitle


Quote:
> Hi.

> How do I change the text in the title bar of an MFC SDI application?

> Thanks!
> John



Sat, 20 Apr 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Changing title bar text

2. How to programmatically change title bar text.

3. Changing Title Bar Text of a Child Window

4. Change Title Bar Text of CPropertySheet

5. Changing Title Bar Text of a Child Window

6. Changing text on title bar

7. How to change Child Title Bar Text?

8. Changing text in title bar

9. Text box on Title bar

10. show a text in the title bar

11. Text on title bar - Help!

12. Title Bar Text

 

 
Powered by phpBB® Forum Software