且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在MFC ActiveX控件中编写代码

更新时间:2023-02-11 22:08:21

报价:

标识符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.