问题描述
我有一个带有html帮助的MFC应用程序,Visual Studio会自动生成一个名为HTMLDefines.h的文件.
我向该文件添加了自己的标识符,但是只要更改环境中的资源,它就会被覆盖.
我的问题是:有什么方法可以从resource.h中自动将标识符(或我指定的标识符,如IDD_ *)自动写入HTMLDefines.h文件?
I have an MFC app with html help, and automatically Visual Studio generates a file named HTMLDefines.h
I added my own identifiers to this file, but it keeps getting overwritten whenever I change the resources in the environment.
My question is: Is there any way I can get my identifiers (or ones that I specify, like just IDD_*) from resource.h automatically written into the HTMLDefines.h file?
推荐答案
#define HIDD_RENAME_DIALOG 100000
#define HIDC_RICHEDIT 100001
#define HIDC_STATUSBAR 100002
#define HIDC_MIN_RECT 100003
...
和.cpp文件包含
// IDD_RENAME_DIALOG
IDD_RENAME_DIALOG, HIDD_RENAME_DIALOG,
IDC_RICHEDIT, HIDC_RICHEDIT,
IDC_STATUSBAR, HIDC_STATUSBAR,
IDC_MIN_RECT, HIDC_MIN_RECT,
...
如果您认为可以使用它,我会将其上传到Codeproject.如果您不想运行未知的exe,请通过电子邮件将.rc文件发送给我,然后我将通过电子邮件将.h和.cpp文件发送给您.
gmail dot com上的hdietrich
If you think you will be able to use this, I will upload it to Codeproject. If you do not want to run an unknown exe, email me your .rc file and I will email you back the .h and .cpp files.
hdietrich at gmail dot com
这篇关于帮助文件ID号已被覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!