In my application I want to add the version ID as a macro and use it in multiple parts of the application. As explained in this question I can easily generate a string with this:
#define APP_VER "1.0"
#define APP_CAPTION "Stackoverflow example app v." ## APP_VER
My problem is now, that in some parts, I need to have the caption as an unicode string.
I tried the following:
MessageBoxW(0,_T(APP_CAPTION),L"Minimal Counterexample",0);
But it gives the error "can't concernate wide 'Stackoverflow example app v.' with narrow '1.0'"
I also tried
#define WIDE_CAPTION L ## APP_CAPTION
But that just gives "LAPP_CAPTION" is not defined.
I know that I can convert the string at runtime to unicode, but that is rather messy. Can someone provide a Macro-level solution for my problem?