DotNameLib
Loading...
Searching...
No Matches
WindowsHeaders.hpp
Go to the documentation of this file.
1#ifndef WINDOWS_HEADERS_HPP
2#define WINDOWS_HEADERS_HPP
3
4// Universal Windows.h wrapper with Raylib compatibility
5// Include this instead of <windows.h> directly to avoid conflicts
6
7#ifdef _WIN32
8#ifndef NOMINMAX
9#define NOMINMAX
10// Disable min/max macros in windows.h to avoid conflicts with std::min/max
11#endif
12
13// Protect Raylib functions from Windows.h macro conflicts
14#define Rectangle WindowsRectangle
15#define CloseWindow WindowsCloseWindow
16#define ShowCursor WindowsShowCursor
17#define DrawText WindowsDrawText
18#define PlaySound WindowsPlaySound
19#define LoadImage WindowsLoadImage
20#define DrawTextEx WindowsDrawTextEx
21
22#include <windows.h>
23
24// Restore Raylib function names
25#undef Rectangle
26#undef CloseWindow
27#undef ShowCursor
28#undef DrawText
29#undef PlaySound
30#undef LoadImage
31#undef DrawTextEx
32
33#endif // _WIN32
34
35#endif // WINDOWS_HEADERS_HPP