How to remove the "Untitled" from a SDI menu bar. Please provide sample of code if you know. Thank you
jana
Printable View
How to remove the "Untitled" from a SDI menu bar. Please provide sample of code if you know. Thank you
jana
Try to override precreatewindow() func like following
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style &= ~FWS_ADDTOTITLE;
return CFrameWnd::PreCreateWindow(cs);
}
Hope for help. :)
Walter
Easy; just add a line in the your App InitInstance() function.
Example...
BOOL CYourSDIApp::InitInstance()
{
....
...
...
m_pMainWnd->UpdateWindow(); //Deafault, add my VC++
m_pMainWnd->SetWindowText(""); //Add this line to remove the SDI title
..
..
}
Hello World!!!