Click to See Complete Forum and Search --> : Removing 'Untitled' text


sanket
April 21st, 1999, 05:37 PM
I have an SDI application. I gave my application a title in the string table. But when the application comes up, it shows Untitled

<Application Name>.

How do I get rid of this Untitled

from the application's title bar?

junpin Li
April 21st, 1999, 09:06 PM
You need change the window style for the mainframe. Go to your MainFrame implementation codes, change the style in ::PreCreate() (I don't remember exactly which member function, should be obvious though). I did this once some time ago. I will check my codes and give exactly what needs to be done tommorrow.

SKB
April 22nd, 1999, 04:37 AM
Call SetTitle() on the docoument(CDocument) to change the Untitled string

chris law
April 22nd, 1999, 06:49 AM
PreCreateWindow(CreateStruct cs...
AddToTitle property


chrislaw

Michael Decker
April 22nd, 1999, 07:48 AM
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;

// TODO: Modify the Window class or styles here by modifying the CREATESTRUCT cs

cs.style &= ~FWS_ADDTOTITLE;
return TRUE;
}