一个拆分窗口的问题?(怎么弄也不对,各位帮我看看吧)
下面代码编译链接都没有问题,只是到运行到”××ד处就出错,请问各位高手这是什么问题啊!!!
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
if (!m_wndSplitter.CreateStatic(this, 2,1))
return false;
// ×××出错“viewform.cpp, 64行
if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CProjListDlg), CSize(0,0), pContext))
return false;
if (!m_wndSplitter.CreateView(1, 0, RUNTIME_CLASS(CProjListDlg), CSize(0,0), pContext))
return false;
return true;
}
ProjListDlg.h:
class CProjListDlg : public CFormView
{
DECLARE_DYNCREATE(CProjListDlg)
protected:
CProjListDlg(); // 动态创建所使用的受保护的构造函数
virtual ~CProjListDlg();
public:
enum { IDD = IDD_DLG_PROJ };
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
};
问题点数:100、回复次数:2Top
1 楼spark_zh()回复于 2003-12-01 17:00:43 得分 100
你的那个CProjListDlg对话框有child属性吗?Top
2 楼l_b_q()回复于 2003-12-01 17:18:53 得分 0
FormView的对话框资源需要把syle设为Child, Border设为NoneTop




