You are not the first to be bitten by these ancient macros. They can’t remove them, that would break old code. So they came up with another macro to remove the sting. Make it look like this:
#ifndef NOMINMAX
# define NOMINMAX
#endif
#include <windows.h>
// Rest of your #includes here
//...