D
David W
Hello,
In a C++ MFC application I need to conditionally #include one of two additional
resource files in my main resource file because different forms of the
application have different names. I would also like to edit the main resource
file with the IDE's resource editor and save it without losing the conditional
#includes of the name-specific resource files. So, the main resource file
includes the following:
3 TEXTINCLUDE
BEGIN
"#include ""apptype.h""
"#ifdef APP_A" // <---- error
"#include ""app_a.rc""
"#else"
"#include ""app_b.rc""
"#endif"
// the other #includes
"\0"
END
However, RC is producing an RC2104 error on the marked line with the message
"Undefined keyword or key name: #ifdef". Since RC normally understands #ifdef I
don't understand why it complains about one in a TEXTINCLUDE. Can someone
explain it?
On the same subject, this is an MDI application with one menu for each of many
different document types. I have had to put _all_ menus in both
app-name-specific resource files, and it's only because of the "About..." item
on the Help menu (since, by convention, this item includes the application name:
"About AppA..." or "About AppB..."). This means that any menu changes must be
done in both resource files. Is there an easier way to do this?
I am using VS .NET 2003.
David
In a C++ MFC application I need to conditionally #include one of two additional
resource files in my main resource file because different forms of the
application have different names. I would also like to edit the main resource
file with the IDE's resource editor and save it without losing the conditional
#includes of the name-specific resource files. So, the main resource file
includes the following:
3 TEXTINCLUDE
BEGIN
"#include ""apptype.h""
"#ifdef APP_A" // <---- error
"#include ""app_a.rc""
"#else"
"#include ""app_b.rc""
"#endif"
// the other #includes
"\0"
END
However, RC is producing an RC2104 error on the marked line with the message
"Undefined keyword or key name: #ifdef". Since RC normally understands #ifdef I
don't understand why it complains about one in a TEXTINCLUDE. Can someone
explain it?
On the same subject, this is an MDI application with one menu for each of many
different document types. I have had to put _all_ menus in both
app-name-specific resource files, and it's only because of the "About..." item
on the Help menu (since, by convention, this item includes the application name:
"About AppA..." or "About AppB..."). This means that any menu changes must be
done in both resource files. Is there an easier way to do this?
I am using VS .NET 2003.
David