This is why I'm confused. So just to recall, I have UsefulSplitterWnd and two child views of the split. The left one is a CTreeView and the right one is a CFormView. Each of the CFormViews has an associated dialog that it displays. Here's what I've tried with these CFormViews. First, I tried overriding OnCreate(...). But this function is never called at any time during execution of my application. Next, I tried overriding OnUpdate(...) and OnInitialUpdate(...). I put breakpoints in these functions and found that they are only executed once, at the start up of the application. They are never called again, even when CUsefulSplitterWnd::replaceview(...) is called. There are basically two important functions that CUsefulSplitterWnd::replaceview(...) calls. They are:
// Delete existing view
((CView *) GetPane(row,col))->DestroyWindow();
This destroys the window associated with the CFormView. However, in searching the MSDN help docs, it says that this function doesn't destroy the CFormView class object. So my class must be around somewhere (?). The second important function is:
// Create new view
context.m_pNewViewClass=pViewClass;
context.m_pCurrentDoc=pDoc;
context.m_pNewDocTemplate=NULL;
context.m_pLastView=NULL;
context.m_pCurrentFrame=NULL;
CreateView(row,col,pViewClass,size, &context);
This should be telling me what function I need to override so that the dialog is initialized to the saved values in my CDocument subclass. But, I tried all the sensible functions. They are either never called in the app, or only called once at app startup. I'm pretty lost. :confused: Max