【问题标题】:How to create splitter window in dialog, attach example如何在对话框中创建拆分窗口,附上示例
【发布时间】:2013-12-27 01:40:21
【问题描述】:

我是在拆分器窗口练习,我参考这个网站,

Creating a Splitter Window in a Dialog Box in Three Easy Steps

当我构建它时,一些我无法解决的错误,比如跟随代码......

Out of memory creating a splitter pane.
Error: Trying to create object which is not DECLARE_DYNCREATE 
or DECLARE_SERIAL: CDialogEx.

Out of memory creating a splitter pane.

Error: Trying to create object which is not DECLARE_DYNCREATE 
or DECLARE_SERIAL: CDialogEx.

此示例的下载链接,请重写示例,

splitter dialog example

另一个功能,我想创建一个带有按钮和静态的两个面板

和listcontrol项。

谢谢你。

【问题讨论】:

    标签: mfc dialog splitter


    【解决方案1】:

    不要使用基于对话框的应用程序。只需使用向导。使用CFormView 创建一个 SDI 示例...稍后集成拆分器窗口。

    创建对话框并将所有CFrameWnd 功能集成到CDialog 中对我来说没有意义...

    【讨论】:

      【解决方案2】:

      我用CWnd替换了CDialog1然后解决了这个问题。

      ccc.m_pNewViewClass = RUNTIME_CLASS(CWnd);
      m_cSplitter.CreateView(0,0, RUNTIME_CLASS(CWnd),
          CSize(100,100), &ccc);
      m_cSplitter.CreateView(0,1, RUNTIME_CLASS(CWnd),
          CSize(100,100), &ccc);
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-11-28
        • 2013-04-28
        • 2012-06-27
        • 2023-03-17
        • 2016-05-31
        • 2020-11-03
        • 1970-01-01
        相关资源
        最近更新 更多