Article ID: 113294
Article Last Modified on 11/21/2006
void CFrameWnd::UpdateFrameTitleForDocument(const char* pszDocName)
{
...
// keep the original title up to first '-'
LPSTR pchDash = _AfxStrChr(szText, '-');
LPSTR pchPrev;
if (pchDash != NULL &&
*(pchPrev = AnsiPrev(szText, pchDash)) == ' ')
pchDash = pchPrev;
// remove anything after "-" or " -"
if (pchDash != NULL)
*pchDash = '\0';
// get name of currently active view
if (pszDocName != NULL)
{
lstrcat(szText, " - ");
lstrcat(szText, pszDocName);
// add current window # if needed
if (m_nWindow > 0)
wsprintf(szText + lstrlen(szText), ":%d", m_nWindow);
}
}
The cause of the problem is line 871, where a NULL character replaces the
first hyphen found in the title.
Additional query words: 1.00 2.00 2.10 kbNoUpdate
Keywords: kbbug kbfix kbuidesign kbvc150fix KB113294