The scenario is this. I have written a program and used a company name in many dialogs. Now they program to be sold by another company as well, and then all dialogs must have the other company's name. I'm guessing there's a chance that this will happen again, so instead of changing all dialogs I'm thinking of having the dialogs build dynamicly. Now to the problem. Since I was in a hurry (and still am), no string resources were used. Also, every dialog was created within the resource editor (VC++). So I was thinking somehing like this:
// use the define needed for this build
#define COMPANY_NAME xxx
//#define COMPANY_NAME yyy
// Suppose the original text is something like "Hello and welcome to this great program by COMPANY_NAME. If you found any bugs, it's your own fault for doing things wrong so please don't call."
#define _MY_TEXT_FOR_THIS_DIALOG_ "bla bla bla" ## COMPANY_NAME ## "bla bla bla"
//Then in the resource
LTEXT _MY_TEXT_FOR_THIS_DIALOG_, IDC_STATIC,1,10,100,20
The problem is then that the preprocessor doesn't expand COMPANY_NAME to xxx or yyy.
I know how to solve the problem by rewriting lot's of code, but I guess it should be possible to do something like this?