Even if you include “AllowWindowsPlatformTypes.h” you may get the following…
You have included windows.h before MinWindows.h
All useless stuff from the windows headers won't be excluded !!!
I’ll answer next and am including this post for archival purposes.
This can occur if you have not included “Engine.h” or similar core UE header before the “window.h” include.
This doesn’t solve the problem in 4.16 with IWYU mode. The warning is generated by first few lines of MinWindows.h. After looking at UE source code it seems that we should be including WindowsHWrapper.h?