if you want to change it, use
1. PreCreateWindow
http://support.microsoft.com/support/kb/articles/Q99/1/82.ASP2. OnUpdateFrameTitle
void CMyMDIChild::OnUpdateFrameTitle(BOOL bAddToTitle)
{
// update the parent window first
GetMDIFrame()->OnUpdateFrameTitle(bAddToTitle); if ((GetStyle() & FWS_ADDTOTITLE) == 0)
return; // leave child window alone! CDocument* pDocument = GetActiveDocument();
if (bAddToTitle && pDocument != NULL)
{
TCHAR szText[256];
lstrcpy(szText, pDocument->GetTitle());
CString sAdd;
sAdd.LoadString(IDS_MYWINDOWTITLE);
lstrcat(szText, sAdd); // set title if changed, but don't remove completely
AfxSetWindowText(m_hWnd, szText);
}
}
1. PreCreateWindow
http://support.microsoft.com/support/kb/articles/Q99/1/82.ASP2. OnUpdateFrameTitle
void CMyMDIChild::OnUpdateFrameTitle(BOOL bAddToTitle)
{
// update the parent window first
GetMDIFrame()->OnUpdateFrameTitle(bAddToTitle); if ((GetStyle() & FWS_ADDTOTITLE) == 0)
return; // leave child window alone! CDocument* pDocument = GetActiveDocument();
if (bAddToTitle && pDocument != NULL)
{
TCHAR szText[256];
lstrcpy(szText, pDocument->GetTitle());
CString sAdd;
sAdd.LoadString(IDS_MYWINDOWTITLE);
lstrcat(szText, sAdd); // set title if changed, but don't remove completely
AfxSetWindowText(m_hWnd, szText);
}
}
解决方案 »
- 用MFC怎么实现CAsyncSocket套接字的tcp连接?
- 为什么加载DLL函数失败呢?
- 读txt文件,然后显示到edit上的问题
- 求助:精确地画一个圆角矩形
- 【C+SDK】编程时,如何把一副位图文件作为窗口的背景?
- Excel中块的复制和粘贴?
- SetWindowPos后,如何让Dialog随窗口移动?
- 菜鸟有礼了,菜鸟刚学vc,有几个难点想问问高手.....
- fatal error C1010: unexpected end of file while looking for precompiled header directive
- 有哪位达人知道这个宏的含义__out_bcount_part'
- 请问高手
- 连接错误
在该函数的return TRUE;之前。
CString str;
str=this->GetTitle();
那个,str就是.
void GetWindowText( CString& rString ) const;CString rWinString;
this->GetWindowText(&rWinString);