I've got a CGXTabWnd with about a dozen tabs on it. I need to be able to control which of the dozen tabs are shown (or hidden).
RemoveTab calls CWnd::DestroyWindow() to destroy the window. Overriding this function in the derived view class should take care of preventing this. Once this is prevented the view pointer should be stored in a accessible place. Then this view can be added whenever needed by calling CGXTabWnd::AttachWnd like this
if (m_addView != NULL)
m_addView->GetTabWnd()->AttachWnd(m_addView, "added");
In this case m_addView is the pointer to the previously hidden view.