1. 6

  2. 4
    #define NOMINMAX
    #define WIN32_LEAN_AND_MEAN
    #include <windows.h>

    was how we used to do this.

    1. 2

      Don’t forget about

      #undef near
      #undef NEAR
      #undef far
      #undef FAR

      Big wtf moment running into those porting from Linux to Windows.

      1. 1

        Oh man, near and far pointers. Things we don’t really need to worry about anymore…

    2. 1

      Are there any projects that wrap Win32 so you don’t get any Windows.h pollution? (And provide nice RAII types for everything?)

      1. 1

        MFC does a lot of what you’re asking, and has been supported by Microsoft since the 90s.

        1. 1

          CNoThanks :)