the title of the window
-
i create a new single document project with wizard,and the name of the project name is MyProject.after execute the proprame, the caption of the window is "untitled:1-MyProject" Now i ask how to remove the sign ":"? gucy
-
i create a new single document project with wizard,and the name of the project name is MyProject.after execute the proprame, the caption of the window is "untitled:1-MyProject" Now i ask how to remove the sign ":"? gucy
hello...... u can set the title of the application window in InitInstance() function of the SDI application class.... u'll have m_pMainWnd as member variable... all u've to do is m_pMainWnd->SetWindowText("MyProject"); or go to string table and change IDS_APP_TITLE Caption to Myproject...... try the first one...which is better Adi
-
i create a new single document project with wizard,and the name of the project name is MyProject.after execute the proprame, the caption of the window is "untitled:1-MyProject" Now i ask how to remove the sign ":"? gucy
This is strange, as a default SDI, or even an MDI, application would have a caption of Untitled - MyProject. It sounds like you've changed something to get the additional ":1" in the caption. Now to get rid of the "Untitled - " part of the caption, simply add the following to your CMainFrame::PreCreateWindow() function:
cs.style &= ~FWS_ADDTOTITLE;
-
This is strange, as a default SDI, or even an MDI, application would have a caption of Untitled - MyProject. It sounds like you've changed something to get the additional ":1" in the caption. Now to get rid of the "Untitled - " part of the caption, simply add the following to your CMainFrame::PreCreateWindow() function:
cs.style &= ~FWS_ADDTOTITLE;
The :1 indicates the view number of of the document is open in the current session (MDI-related). For more details, look at the MFC source code file WINFRM.CPP, function
void CFrameWnd::UpdateFrameTitleForDocument(LPCTSTR lpszDocName)
onwards and upwards... -
The :1 indicates the view number of of the document is open in the current session (MDI-related). For more details, look at the MFC source code file WINFRM.CPP, function
void CFrameWnd::UpdateFrameTitleForDocument(LPCTSTR lpszDocName)
onwards and upwards...I knew I'd seen the :1 before but since I've probably only written 3 MDI apps since they were introduced, I couldn't pull it from memory. Even so, I've not ever needed to open two of the same window! Most of what I do revolves around dialog boxes, and SDI apps, or no UI at all.