My app requires me to change logos and icons every time it is compiled for each customer. Doing this by hand is, naturally, time consuming and error prone, so I have written the .Net form to load its images and icons from a .rc file, but I'm trying to work some preprocessor magic in the resources file.
My goal is to have it automatically load only one image and icon from a directory that has the customer's id. This will prevent the .rc file from linking unneeded images and files, and make setup for each customer as simple as a single prepcessor command.
I have a token called "CUSTOMER_ID" that is the folder name of their resources. So, their files would be in "../files/images/customer1/" where CUSTOMER_ID = customer1.
I want to get the preprocessor to concatenate the constant of "..files/images/" with CUSTOMER_ID, followed by "icon.ico" or "logo.bmp" so that I can define the resource. This is what I have currently:
//in resources.rc
#include "airline.h"
#define CONCAT(dir, cid, filetype) dir ## cid ## filetype
IDI_ICON1 ICON CONCAT("../files/images/",CUSTOMER_ID,"icon.ico")
However, the results always end up off. Advice?