Visual studio mangles resource file: is prevention possible ?
Posted on 2005-04-21
I have a resource file, that contains several #if defined statements. The purpose of these is simply to only provide certain functionality if a symbol is defined.
#if defined (_LIMITED_FEATURE)
MENUITEM "Limited Feature.", ID_FILE_LIMITED_FEATURE
But I find that occasionally visual studio will remove all my #if defined statements (meaning all menu items are available regardless of any symbol I may define), which is a total pain. Is there any way I can prevent it doing this ? I have been advised it is something to do with the macro APSTUDIO_INVOKED, but Googling only brings back other people's resource files: not useful.