VC++ 和 MapPoint OCX 控件对话框问题
我正在编写一个基于 VC++ MFC 对话框的应用程序,它需要嵌入 Microsoft MapPoint。 为此,我使用 MS VC++ .NET 2003 和 MapPoint Europe 2006 来执行此操作,但遇到问题,因为当我选择“插入 ActiveX 控件”时,选项列表中没有出现 MapPoint 控件。 我尝试使用 regsvr32
手动注册 mappointcontrol.ocx
,这似乎成功了,但控件仍然没有出现在列表中。
任何人都可以建议我在这里做错了什么,以及任何可能的解决方案。
谢谢伊恩
I am writing a VC++ MFC dialog based app which requires Microsoft MapPoint embedding in it. To do this I'm using MS VC++ .NET 2003 and MapPoint Europe 2006 to do this but am having problems as when I select "Insert ActiveX Control" no MapPoint control appears in the list of options. I have tried manually registering mappointcontrol.ocx
with regsvr32
which appears to succeed but still the control doesn't appear on the list.
Can anyone suggest what I am doing wrong here, and any possible solutions.
Thanks
Ian
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过使用 ActiveX 控件测试容器? 它在控件列表中吗? 使用测试容器中的注册按钮怎么样?
还要检查注册表以查看它是否已注册。 HKEY-CLASSES-ROOT\controlName 中应该有一个条目,其中包含指向 UUID 的 CLSID 元素。 该 UUID 还应位于 HKEY-CLASSES-ROOT\CLSID\uuid 中,并具有指向 DLL 的 LocalServer32 条目和指向 controlName 的 ProgID。
Have you tried using the ActiveX control test container? Is it in the list of controls? How about using the register button in the test container?
Also check the registry to see if it is registered. You should have an entry in HKEY-CLASSES-ROOT\controlName that has a CLSID element that points to a UUID. That UUID should also be in HKEY-CLASSES-ROOT\CLSID\uuid and have a LocalServer32 entry that points to the DLL and ProgID that points back to controlName.
我现在已经让 Mappoint 控件开始工作,但方式略有不同。 该控件确实出现在测试容器可以使用的控件列表中。 我已尝试重新注册它并取消注册它,但当我尝试“插入 ActiveX 控件”时,它仍然没有出现在控件列表中。 但是,如果我使用“添加/删除工具箱项目”,我可以将其添加到工具箱,然后将其拖到我的应用程序中,它可以正常工作。 我不确定为什么这个方法有效,但它确实有效,而且我可以继续我的编码。
非常感谢您对此提供的所有帮助。
I have now got the Mappoint control working but in a slightly different way. The control does appear on the list of controls the test container can use. I have tried reregistering it and unregistering it but still it doesn't appear on the list of controls when I try a "Insert ActiveX Control". However if I use "Add/Remove Toolbox Items" I can add it to the toolbox and then drag it into my app where it works fine. I'm not sure why this method works but it does and I can get on with my coding.
Many thanks for all your help with this.