visual studio 2008 - How to close tab in CMFCTabCtrl -
i have used cmfctabctrl in mfc application , have enabled active tab close button.
m_tabcontrol.enableactivetabclosebutton();
but when click close button, tab not closed. how close tab properly??..
thanks.
when click close button, wm_close
message sent window used in addtab
during initialisation.
so, in child window, add wm_close
message handler , this:
void cmytabwindow::onclose() { // nb - must created tab ctrl parent cmfctabctrl *ptab = static_cast<cmfctabctrl*>(getparent()); ptab->removetab(ptab->getactivetab()); }
Comments
Post a Comment