目前进度:
多文档界面,,2个子窗口,并且一开始就实现了左右排列
STEP 2:
怎么改写主窗口和子窗口的标题
拜托写得详细点,譬如在什么地方加上什么东西,并且稍微给点注释
搞定马上给分,谢谢!
CWnd::SetWindowText
void SetWindowText( LPCTSTR lpszString );
Parameters
lpszString
Points to a CString object or null-terminated string to be used as the new title or control text.
Remarks
Sets the window’s title to the specified text. If the window is a control, the text within the control is set.
This function causes aWM_SETTEXT message to be sent to this window.
对于主窗口的标题也可以用SetTitle, 如
可以通过调用m_pMainWnd这个指针,m_pMainWnd->SetTitle ("Ha Ha");
具体位置你要根据自己的程序而定
在应用程序类:
CApp::InitInstance()
{
.....
m_pMainWnd->SetWindowText("....");
m_pMainWnd->UpdateWindow();
}
如果不用不的窗口类的话,我也想不到什么好办法。你可以用一个全局变量来指示当前创建的是第一个窗口还是第二个窗口,根据这个变量值在CChildFrame::OnCreate中给子窗口设置不同的标题。