Click here to Skip to main content
Rate this: bad
good
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
goorley513
Edited 23-Feb-11 23:24pm
v2
Comments
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
good
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
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
  Permalink  
v3
Comments
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 350
1 Jochen Arndt 190
2 Richard MacCutchan 135
3 Sergey Alexandrovich Kryukov 120
4 DamithSL 105
0 OriginalGriff 6,045
1 DamithSL 4,611
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,310


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 24 Feb 2011
Copyright © CodeProject, 1999-2014
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