程序运行后提示failed to create empty document错误
在这个函数里
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWndEx::OnCreate(lpCreateStruct) == -1)
return -1;
这个地方出返回False
// create docking windows
if (!CreateDockingWindows())
{
TRACE0("Failed to create docking windows\n");
return -1;
}
在
BOOL CMainFrame::CreateDockingWindows()
{
BOOL bNameValid;
// Create class view
CString strClassView;
bNameValid = strClassView.LoadString(IDS_CLASS_VIEW);
ASSERT(bNameValid);
if (!m_wndClassView.Create(strClassView, this, CRect(0, 0, 200, 200),TRUE,
ID_VIEW_CLASSVIEW,WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|
CBRS_LEFT | CBRS_FLOAT_MULTI ))
{
TRACE0("Failed to create Class View window\n");
return FALSE; // failed to create
//创建内存窗口
CString strMemWnd;
bNameValid = strMemWnd.LoadString(IDS_MEM_WND);
ASSERT(bNameValid);
if (!m_wndMemWatch.Create(strMemWnd, this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_MEMVIEW, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI ))
{
TRACE0("Failed to create Properties window\n");
return FALSE; // failed to create
}
//创建变量窗口
CString strVarWnd;
bNameValid = strVarWnd.LoadString(IDS_VARVIEW);
ASSERT(bNameValid);
//此处的Create返回了0
if (!m_wndVarWatch.Create(strVarWnd, this, CRect(0, 0, 200, 200), TRUE, ID_VIEW_VARVIEW, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI ))
{
TRACE0("Failed to create Properties window\n");
return FALSE; // failed to create
}
这是什么问题造成的呢?