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?
Printable View
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?
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.
Call SetTitle() on the docoument(CDocument) to change the Untitled string
PreCreateWindow(CreateStruct cs...
AddToTitle property
chrislaw
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;
}