Is there a way to dynamically add and delete views at runtime?
You may add views by calling the CreateView member. If you want to create a new view based on the same document template settings as for the active view, you can pass pContext = NULL and only specify the runtime class of the view to be added. If you want to specify for example the document type or menu id, you may create a CCreateContext on the stack and pass it to CreateView.
You may delete views by calling the RemoveTab member.