I have an application I'm writing using the MFC Feature pack. It uses Document/View. Since these classes are derived from "normal" MFC classes, these questions may not be Feature Pack specific.
When a change is made, I add an asterisk *
to the name on the tab, and the word (modified)
to the main window title using the following code:
tabval = "Report_" + pDoc->rptData.reportId.Strip();
winval = tabval;
if (changed) {
tabval += " *";
winval += " (modified)";
}
frame->SetTitle(tabval);
frame->SetWindowText(tabval);
name = mainFrame->GetTitle();
mainFrame->SetWindowText(name + " - " + winval);
But when changing between tabs, the original text comes back. First question: how do I make the change sticky?
Second question: there's a tree view on the left and a properties window on the right. Switching between them (un)highlights the title bars to show which one is active. The user can also activate and interact with the document window, but there doesn't seem to be any way to give visual feedback that the document window is, in fact, active. How can I do that?