Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C++ MFC
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 22:27pm
Edited 23-Feb-11 23:24pm
Hans Dietrich at 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 at 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
0 OriginalGriff 520
1 Maciej Los 205
2 Suvendu Shekhar Giri 159
3 Peter Leow 140
4 Kornfeld Eliyahu Peter 133
0 Sergey Alexandrovich Kryukov 9,623
1 OriginalGriff 8,895
2 Peter Leow 5,044
3 Kornfeld Eliyahu Peter 3,333
4 Maciej Los 2,561

Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 24 Feb 2011
Copyright © CodeProject, 1999-2015
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