i have a MDI app whereby i have 2 views.
i switch between them by means of menu buttons.
eg. to switch to the first view i use the code

POSITION pos;
pos=GetFirstDocTemplatePosition();
CDocTemplate* pTempl=NULL;
pTempl=GetNextDocTemplate(pos); pTempl->OpenDocumentFile(NULL);




from the first to the second

POSITION pos;
pos=GetFirstDocTemplatePosition();
CDocTemplate* pTempl=NULL;
pTempl=GetNextDocTemplate(pos);
pTempl=GetNextDocTemplate(pos);
pTempl->OpenDocumentFile(NULL);




at the beginning one can chose between the views.
suppose i chose A between A,B
then i wish to switch to B
everything works.
switching back to A gives a problem( does not switch)
can anyone help?