#if constantexpression
This directive carries out conditional compilation of the resource file by checking the specified constantexpression. If constantexpression is nonzero, #if directs the Resource Compiler to continue processing statements up to the next #endif, #else, or #elif directive, then skip to the statement after #endif. If constantexpression is zero, #if directs the compiler to skip to the next #endif, #else, or #elif directive.
The constantexpression field specifies a defined name, an integer constant, or an expression consisting of names, integers, and arithmetical and relational operators.
The following example demonstrates the correct usage of the #if statement:
#if Version<3
errbox BITMAP errbox.bmp
#endif