To remove a tab

Call the RemoveTab() method. Don’t forget to destroy the contained CWnd. For example:

 

// Don't just delete the tab, destroy the associated

// window too.

if (m_tabWnd.GetTabInfo(nActiveTab, lpszLabel,

bSelected, pActiveWnd, pExtra))

{

pActiveWnd->ShowWindow(SW_HIDE);

pActiveWnd->SendMessage(WM_CLOSE);

}