Please tell me how can we change the title of an SDI project which is by default 'untitled..'
Printable View
Please tell me how can we change the title of an SDI project which is by default 'untitled..'
Just redefine the PreCreateWindow function of the CMainFrame class like this:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.style = WS_OVERLAPPEDWINDOW;
cs.lpszName = "My ****ing Title";
return CFrameWnd::PreCreateWindow(cs);
}
If all you want to do is get rid of that ugly "Untitled - " part, and leave the name of your app behind, do this:
// Comment out FWS_ADDTOTITLE to get rid of "Untitled - MyApp" on the title bar.
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style &= ~ FWS_ADDTOTITLE;
return CFrameWnd::PreCreateWindow(cs);
}
LA Leonard - Definitive Solutions, Inc.