VS 2008 MFC Feature Pack - How do I -
i have application i'm writing using mfc feature pack. uses document/view. since these classes derived "normal" mfc classes, these questions may not feature pack specific.
when change made, add asterisk *
name on tab, , word (modified)
main window title using 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, original text comes back. first question: how make change sticky?
second question: there's tree view on left , properties window on right. switching between them (un)highlights title bars show 1 active. user can activate , interact document window, there doesn't seem way give visual feedback document window is, in fact, active. how can that?
it's not clear types variables are, have pdoc
, frame
, i'm assuming former cdocument
derived class , latter possibly cframewnd
or cmdiframewnd
derived class.
if i'm not far wrong, reason why tab titles aren't sticking should calling settitle
on cdocument
that's behind each tabbed view, like
tabval = "report_" + pdoc->rptdata.reportid.strip(); winval = tabval; if (changed) { tabval += " *"; winval += " (modified)"; } pdoc->settitle(tabval); // set tab title on cdocument
Comments
Post a Comment