方法:直接修改GdiplusTypes.h,在最前面包含上windows.h和minmax.h两个头文件。如下:
#include <windows.h>
#include <minmax.h>
#ifndef _GDIPLUSTYPES_H
#define _GDIPLUSTYPES_H
#include <winapifamily.h>
知道解决方法后头看
经验:
1.搜CSDN试了很多方法无果
2.搜google第一条与我的方法最吻合https://social.msdn.microsoft.com/Forums/vstudio/en-US/455d1a2b-00fb-40c2-a8e0-cda9b7255167/error-c3861-max-identifier-not-found?forum=vclanguage
3.最后是找可以运行代码的另一台机子上的GdiplusTypes.h,才发现要加入这两个头文件,估计也是之前我修改过的