【问题标题】:Issue on adding ActiveX Controls in MFC CPropertySheet (Windows 7 64 bit and Windows 2008 Server)在 MFC CPropertySheet 中添加 ActiveX 控件的问题(Windows 7 64 位和 Windows 2008 Server)
【发布时间】:2012-08-07 12:18:55
【问题描述】:

我有一个带有 CPropertPage 和 CPropertySheet 的 MFC 应用程序。 PropertyPages 在运行时被添加到 CPropertySheet 中。

我在设计时将 VB ActiveX 用户控件(在 VB 6.0 中创建)添加到 PropertyPage 中。此应用程序在 Windows XP 中运行良好,并且用户控件已正确加载。

同一应用程序在 Windows 7 64 位和 Windows 2008 服务器中加载用户控件时存在问题。

如果我删除 UserControls 并在 PropertyPage 中添加 MFC 控件,则 MFC 控件会正确加载。

注意:

我尝试在 MFC ActiveX Container 控件中添加 VB 用户控件。在这种情况下,用户控件正在正确加载。

在 Windows 7 或 Windows 2008 服务器中使用带有 PropertySheet/PropertyPage 的 UserControl 是否有任何问题?

【问题讨论】:

    标签: user-controls vb6 activex cpropertysheet


    【解决方案1】:

    尝试使用“Apartment Threaded”线程模型创建 VB 控件。

    您可以在项目中选择线程模型->属性->常规选项卡->线程模型->“公寓线程”。

    【讨论】:

      猜你喜欢
      • 2014-09-12
      • 1970-01-01
      • 1970-01-01
      • 2012-05-28
      • 2011-10-05
      • 2013-06-06
      • 2012-11-08
      • 1970-01-01
      相关资源
      最近更新 更多