#ifndef name
This directive carries out conditional compilation of the resource file by checking the specified name. If name has not been defined or if its definition has been removed using the #undef directive, #ifndef directs the Resource Compiler to continue processing statements up to the next #endif, #else, or #elif directive, and then to skip to the statement after #endif. If name is defined, #ifndef directs the compiler to skip to the next #endif, #else, or #elif directive.
The following example demonstrates the correct usage of the #ifndef statement:
#ifndef Optimize
errbox BITMAP errbox.bmp
#endif