在MFC ActiveX控件中编写代码 [英] Writing codes in MFC ActiveX Control

查看:66
本文介绍了在MFC ActiveX控件中编写代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试文章.混合解决方案部分.我想知道您是否可以帮助我如何开始在Visual C ++上编写这些代码.我还没有Visual C ++ MFC ActiveX控件的背景知识,到目前为止,我所做的就是创建项目.我还添加了一个对话框和一个类,但出现错误标识符IDD_DIALOG1未定义".我不知道我做对了吗.我不知道该项目是否需要添加对话框,因为作者没有在MFC ActiveX控件中包括要做什么,所以我很难受.请帮助我.谢谢! :)

报价:

标识符IDD_DIALOG1未定义"


这是让您知道没有具有该ID的资源.您很可能更改了对话框资源名称,而没有在最初为您插入的代码中对其进行更改.

在资源编辑器中,与对话框关联的标签是什么(可能具有相同的IDD_前缀)?该标签必须出现在原始IDD_DIALOG1标签出现的任何位置(在代码中,在解决方案中进行快速搜索以找出将旧标识符留在了哪里).


要包含"resource.h",您将得到解决"IDD_DIALOG1未定义"的问题.

据我所知,您需要一个Wndows才能使用ActiveX控件,因此添加对话框似乎是正确的方法.


I am trying this article. The Hybrid Solution Part. I was wondering if you could help me out how do I begin writing those codes on Visual C++. I don''t have background yet in Visual C++ MFC ActiveX Control and what I did so far is to create the Project. I also added a Dialog and a class but I get an error "Identifier IDD_DIALOG1 is undefined". I don''t know if I am doing right. I don''t know if adding a dialog is needed in this project because the author hasn''t included what to do in MFC ActiveX Control so I am getting a hard time. Kindly help me. Thanks! :)

解决方案

Quote:

"Identifier IDD_DIALOG1 is undefined"


This is letting you know that there is no resource with that ID. It''s likely that you changed the dialog resource name and didn''t change it in the code where that was originally inserted for you.

In the resource editor, what''s the label (it''s likely to have the same IDD_ prefix) associated with your dialog? That label needs to appear everywhere where the original IDD_DIALOG1 label appears (in the code, do a quick search within your solution to figure out where you left the old identifier behind).


To include "resource.h",you will get the issue "IDD_DIALOG1 is undefined" resolved.

As I know,your need a Wndows to use the ActiveX control,So Adding a dialog seems a right way to do that.


这篇关于在MFC ActiveX控件中编写代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆