Click here to Skip to main content
13,138,857 members (55,420 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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?
Posted 23-Feb-11 21:27pm
Updated 23-Feb-11 22:24pm
Hans Dietrich 24-Feb-11 4:22am
In case you're wondering, the C++ purists in this forum are probably annoyed at seeing an MFC question, and so downvoted your question. Next time, post MFC questions in the C++/MFC forum. :)

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I have a utility that creates a .cpp and a .h file using a .rc file as input. For example, the .h file contains
#define HIDD_RENAME_DIALOG                                  100000
#define HIDC_RICHEDIT                                       100001
#define HIDC_STATUSBAR                                      100002
#define HIDC_MIN_RECT                                       100003
and the .cpp file contains
IDD_RENAME_DIALOG,                                  HIDD_RENAME_DIALOG,
IDC_RICHEDIT,                                       HIDC_RICHEDIT,
IDC_STATUSBAR,                                      HIDC_STATUSBAR,
IDC_MIN_RECT,                                       HIDC_MIN_RECT,
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
Espen Harlinn 25-Feb-11 3:32am
Nice reply, good attitude - my 5 :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170915.1 | Last Updated 24 Feb 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100