TBBUTTONINFO struct and BTNS_xxx symbols used in the code need _WIN32_IE to be defined with at least 0x0500 value (_WIN32_IE_IE50) in order to be included from commctrl.h.
# pragma GCC diagnostic ignored "-Wmissing-declarations"
#endif
+#if (_WIN32_IE < 0x0500)
+#pragma message("WARNING: Win32 UI needs to be compiled with _WIN32_IE >= 0x0500 (_WIN32_IE_IE50)")
+#define _WIN32_IE 0x0500
+#endif
+
#include <commctrl.h>
#include <stdlib.h>
#include <string.h>