An Easy One...(Changing Title Bar Caption) 
Author Message
 An Easy One...(Changing Title Bar Caption)

...That I can't figure out.

How can one change the title bar caption in an SDI SplitterWnd
application so that "Untitled" doesn't show up?  All I want is the name
of my application. I have tried SetWindowText but "Untitled" still shows
up...

Thanks for your time and assistance.

Craig Janson
Internet Developer
EAS, Inc.



Mon, 28 May 2001 03:00:00 GMT  
 An Easy One...(Changing Title Bar Caption)
Add this to your code:

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{

// This line:
 cs.style &= ~(LONG) FWS_ADDTOTITLE;

 return CFrameWnd::PreCreateWindow(cs);

Quote:
}

'CDocument::SetTitle'  might also be a good one to have a look at.

'SetWindowText' does not work very well in the MFC framework, since it is
being called from the MFC code, changing back what you have just added:-(

Quote:

>...That I can't figure out.

>How can one change the title bar caption in an SDI SplitterWnd
>application so that "Untitled" doesn't show up?  All I want is the name
>of my application. I have tried SetWindowText but "Untitled" still shows
>up...

>Thanks for your time and assistance.

>Craig Janson
>Internet Developer
>EAS, Inc.




Mon, 28 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CListView: Q1 - Show/Hide column and header, Q2 - Caption Title Bar

2. Modify Child Wnd Title Bar Caption in MDI App

3. How to change the whole title (caption) of a PropertyFrame created with OleCreatePropertyFrame

4. How can I change the color of the caption/title of a PropertyPage

5. Easy question: How do I change the caption of a button

6. Change the height of caption bar

7. How to change caption bar text?

8. Change the Height of Title Bar!

9. - Changing the FONT of the title bars and menus

10. Changing Title Bar?

11. How to change Icon on the Title Bar

12. Changing title bar text

 

 
Powered by phpBB® Forum Software