Anonimus
asked on
Title to View
In my application (MDI) ther are several views to one document each one of the views needs to have a different name.
The problem is that when I use SetWindowText to change the title it changes whenever I Open a new document.
If I use SetTitle() I can give only one title to all the views of the document.
The problem is that when I use SetWindowText to change the title it changes whenever I Open a new document.
If I use SetTitle() I can give only one title to all the views of the document.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You must override
void CMDIChildWnd::OnUpdateFram
for example:
{
// update our parent window first
GetMDIFrame()->OnUpdateFra
if ((GetStyle() & FWS_ADDTOTITLE) == 0)
return; // leave child window alone!
CDocument* pDocument = GetActiveDocument();
if (bAddToTitle && pDocument != NULL)
{
//char szText[256];
// here is your place to change text!
SetWindowText(szText);
}
}