Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
RC does not support the ANSI C predefined macros (__DATE__, __FILE__, __LINE__, __STDC__, __TIME__, __TIMESTAMP__). Therefore, you cannot include these macros in header files that you will include in your resource script.
RC does define RC_INVOKED, which enables you conditionally compile portions of your header files, depending on whether the compiler is your C compiler or the RC compiler. This is important because the RC compiler supports only a subset of the statements a C compiler would support.
To conditionally compile your code with the RC compiler, surround code that RC cannot compile with #ifndef RC_INVOKED and #endif.
The following example is taken from the SDK samples. It demonstrates how to create a header file that can be compiled conditionally.
#ifndef RC_INVOKED
#pragma message("Including CntrOutl.H from " __FILE__)
#endif