Maybe you had an include file that somehow prevented windows.h from being included.
stackoverflow.com