views:

70

answers:

1

I have the following macros header file (system.h),

#define rt_metadata 8000
#define dir_metadata "db\metadata"

and resource file (system.db.metadata.rc)

#include "system.h"
SY_ALLOWDATE   rt_metadata    db\metadata\SY.AllowDate.xml 

How do I replace the db\metadata with dir_metadata in the resource file so that it will become something like dir_metadata\SY.AllowDate.xml?

+1  A: 

This is done by the resource compiler (BRCC32.EXE was Borland's version, and Microsoft had one as well).

Macros are done by a precompiler just before compiling; BRCC32 handled both the precompilation and compilation steps of converting an RC file into a binary RES file.

So you can get the macro converted by using the commandline resource compiler:

brcc32 yourresourcefile.rc

You can also define the macro on the commandline as well

brcc32 -dYOURMACRO=yourstring yourresourcefile.rc
Ken White