【问题标题】:VC++: How to display a control on the top of the propertySheet in MFC diaolgVC++:如何在 MFC 对话框的 propertySheet 顶部显示控件
【发布时间】:2015-12-28 06:41:59
【问题描述】:

全部

我对 VC++ 中的属性表有疑问。我有 2 个或更多 mfc 对话框,我通过属性表将这些对话框合并为一个对话框作为选项卡控件。我可以在属性表的顶部放置一个控件吗?有可能吗?

提前致谢。

【问题讨论】:

    标签: c++ visual-c++ mfc


    【解决方案1】:

    如果您使用CPropertySheet,您可以在OnCreate 处理程序中添加您的控件(如MSDN 所述):

    int CMyPropertySheet::OnCreate(LPCREATESTRUCT lpCreateStruct)
    {
        int ret = CPropertySheet::OnCreate(lpCreateStruct);
        if(ret != 0)
            return ret;
        CRect rect;
        GetWindowRect(rect);
        // ... adjust rect here...
        MoveWindow(rect);
        // ... move tab control down here ...
        // ... add your controls above the tabctrl here ...
    }
    

    【讨论】:

      猜你喜欢
      • 2014-04-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-14
      • 2023-01-05
      • 2011-01-20
      • 1970-01-01
      相关资源
      最近更新 更多