I am writing a win32 application using winapi and i want to concatenate a string in my resource file and give the stirng to my menuitem as the string it should show. when i want to give it to a control it works like a charm, but when i want to use it for the menuItem i get an error message. this might me because the preprocessor does not see the concatination as a string?
does anybody have a clue or idea what i could try? there were simillar post i tried to follow - but it gives me the same result...
other posts on so:
Concatenate string and constant in resource file in C++ (MFC)
Concate define and string in resources
C/C++ Macro string concatenation
as i followed these answeres, i got "ID_ABOUT_STR" as my output instead of the value of it most of the times... and else i got the error...
i hope the question is clear and thank you in advance for the effort :)
.rc File:
IDR_MENU1 MENU
BEGIN
POPUP L"System"
BEGIN
MENUITEM ID_EXIT_STR, ID_SYSTEM_EXIT
MENUITEM SEPARATOR
MENUITEM ID_ABOUT_STR, ID_SYSTEM_ABOUT //here i want to give it the ID_ABOUT_STR which is in the resource file...
END
END
resource.h : VER_PRODUCTNAME_STR and the other one just contain strings aswell
#define ID_ABOUT_STR L"About" VER_PRODUCTNAME_STR L" " VER_FILE_DESCRIPTION_STR
This is the error i get:
Error RC2122 unknown menu subtype PRO-PRODUCITON C:\XXX.rc 195
Error RC2125 expected ID value for menu item PRO-PRODUCITON C:\XXX.rc 195