Re: Headers common to .cpp and .rc files
- From: Ulrich Eckhardt <eckhardt@xxxxxxxxxxxxxx>
- Date: Fri, 25 Apr 2008 14:07:34 +0200
Tom Serface wrote:
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.
// prevent editing with the resource editor
#ifdef APSTUDIO_INVOKED
# error this file is not editable by Microsoft Visual C++
#endif
I don't remember where I saw this, but it is contained in all our version.rc
files which only contain a manually-edited version that gets its version
numbers from a common header 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...
Just for the record: there is no compelling reason to have an .RC2 file at
all, safe that it is generated by default for MFC projects. However, you
can also add a resource file to e.g. a console program or DLL. If it
contains the version resources, you can easily check those out by the
properties dialog of Explorer or by the tooltip when just hovering the
mouse above it.
cheers
Uli
--
C++ FAQ: http://parashift.com/c++-faq-lite
Sator Laser GmbH
Geschäftsführer: Michael Wöhrmann, Amtsgericht Hamburg HR B62 932
.
- References:
- Headers common to .cpp and .rc files
- From: David Webber
- Re: Headers common to .cpp and .rc files
- From: Tom Serface
- Headers common to .cpp and .rc files
- Prev by Date: Re: Headers common to .cpp and .rc files
- Next by Date: Re: Headers common to .cpp and .rc files
- Previous by thread: Re: Headers common to .cpp and .rc files
- Next by thread: Loading numbered files in sequence
- Index(es):
Relevant Pages
|