Quote Originally Posted by cpjust
Then you'd be relying on that always being in the preprocessor section of the project settings. If you lose the project settings or switch to a different compiler, you'll get the error again. If you put the #undef in the source file you won't have to worry about it happening again (and newbies reading your code long after you're gone can learn about that problem with the windows header file -- and hopefully you commented why the #undef is there).
What about conditionally defining NO_MIN_MAX before each #include of <windows.h>?