a compatibility layer for running Windows programs. Wine does not require Microsoft Windows, as it is a completely free alternative implementation of the Windows API consisting of 100% non-Microsoft code, however Wine can optionally use native Windows DLL
these are samples, not complete applications. The code (and coding style) is not meant to be industrial strength; it's not even well-designed. The sole purpose of the samples is illustrating a point, not teaching proper coding style.