我从未处理过 activeX 控件,但我想使用 VS2019 将一个添加到现有的 MFC 项目中。我在资源编辑器中创建了一个对话框,添加了我想使用的 activeX 控件(RDP - 尝试了不同的版本),调整了它的大小。然后关闭选项卡,当我尝试在资源编辑器中打开该对话框时,我得到:
---------------------------
microsoft Visual Studio
---------------------------
The activeX control "microsoft RDP Client Control (redistributable) - version 11" could not be instantiated.
---------------------------
OK
---------------------------
出了什么问题,我该如何解决?
另外,那些说(可重新分发)与那些没有的区别是什么?
TIA!!
附言在上述错误之后,如果我再次尝试打开,我会得到:
An error occurred while initializing the frame's content
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode,IntPtr errorInfo)
at microsoft.VisualStudio.Platform.WindowManagement.WindowPaneDocumentObject.Init(Boolean initSize)
at microsoft.VisualStudio.Platform.WindowManagement.DocumentObjectSite.InitializeDocumentObject(Object punkView)
at microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.InitializeDocumentSite(Boolean creatingStubFrame,Boolean replacingStubView,Object punkView,Object punkData,IServiceProvider pServiceProvider,IVsUIHierarchy pUIHierarchy,UInt32 vsid)
at microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.CreateContentPane(Framemoniker framemoniker,Boolean isDocument,String lpstrMkDoc,UInt32 eCreateWindowflags,UInt32 vsid,Guid rguidCmdUI,ViewGroup parent,IVsWindowFrame& ppWindowFrame)
File Path: Path\To\Resource.rc
Frame GUID: 177559e0-d141-11d0-92df-00a0c9138c45
Frame mode: VSFM_Float
Error Code: 0x80004005