////代码为
if(m_uCurrentView==IDD_BOOKADDFORM)
return;
CView *pOldView=GetActiveView();
::SetWindowLong(pOldView->m_hWnd,GWL_ID,m_uCurrentView);
CRuntimeClass *pNewViewClass=RUNTIME_CLASS(CBookAddView);
CCreateContext context;
context.m_pCurrentDoc=GetActiveDocument();
context.m_pNewViewClass=pNewViewClass;
////错误出现下面一行
CView *pNewView=STATIC_DOWNCAST(CView ,CreateView(&context));
        //修改为CView *pNewView=(CView *)CreateView(&context);
        ///仍然是出现同样的错误
if(pNewView!=NULL)
{
pNewView->ShowWindow(SW_SHOWNORMAL);
SetActiveView(pNewView);
pNewView->OnInitialUpdate();
RecalcLayout();
m_uCurrentView=IDD_BOOKADDFORM;
pOldView->DestroyWindow();
}
///////////调试,错误断点
BOOL CFormView::Create(LPCTSTR /*lpszClassName*/, LPCTSTR /*lpszWindowName*/,
DWORD dwRequestedStyle, const RECT& rect, CWnd* pParentWnd, UINT nID,
CCreateContext* pContext)
{
ASSERT(pParentWnd != NULL);
ASSERT(m_lpszTemplateName != NULL); m_pCreateContext = pContext;    // save state for later OnCreate#ifdef _DEBUG
// dialog template must exist and be invisible with WS_CHILD set
if (!_AfxCheckDialogTemplate(m_lpszTemplateName, TRUE))
{
错误标志处: ASSERT(FALSE);          // invalid dialog template name
PostNcDestroy();        // cleanup if Create fails too soon
return FALSE;
}
////////////////////////////////////////////
请大哥不吝指教,如果提示一下切换视图的一些技术将更为感激,谢谢