UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MinWindows.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5// HEADER_UNIT_SKIP - Not included directly
6
7#if !defined(WINDOWS_H_WRAPPER_GUARD)
8#pragma message("WARNING: do not include Windows/MinWindows.h file directly. Use Windows/WindowsHWrapper.h instead")
9#endif
10
11// #TODO: redirect to platform-agnostic version for the time being. Eventually this will become an error
12#include "HAL/Platform.h"
13#if !PLATFORM_WINDOWS
14 #include "Microsoft/MinWindows.h"
15#else
16
17#include "CoreTypes.h"
18
19#if defined(_WINDOWS_) && !defined(UE_MINIMAL_WINDOWS_INCLUDE)
20 #pragma message ( " " )
21 #pragma message ( "You have included windows.h before MinWindows.h" )
22 #pragma message ( "All useless stuff from the windows headers won't be excluded !!!" )
23 #pragma message ( " " )
24#endif // _WINDOWS_
25
26#define UE_MINIMAL_WINDOWS_INCLUDE
27
28// WIN32_LEAN_AND_MEAN excludes rarely-used services from windows headers.
29#define WIN32_LEAN_AND_MEAN
30
31// The below excludes some other unused services from the windows headers -- see windows.h for details.
32#define NOGDICAPMASKS // CC_*, LC_*, PC_*, CP_*, TC_*, RC_
33//#define NOVIRTUALKEYCODES // VK_*
34//#define NOWINMESSAGES // WM_*, EM_*, LB_*, CB_*
35//#define NOWINSTYLES // WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_*
36//#define NOSYSMETRICS // SM_*
37// #define NOMENUS // MF_*
38//#define NOICONS // IDI_*
39//#define NOKEYSTATES // MK_*
40//#define NOSYSCOMMANDS // SC_*
41//#define NORASTEROPS // Binary and Tertiary raster ops
42//#define NOSHOWWINDOW // SW_*
43#define OEMRESOURCE // OEM Resource values
44#define NOATOM // Atom Manager routines
45//#define NOCLIPBOARD // Clipboard routines
46//#define NOCOLOR // Screen colors
47//#define NOCTLMGR // Control and Dialog routines
48//#define NODRAWTEXT // DrawText() and DT_*
49//#define NOGDI // All GDI #defines and routines
50#define NOKERNEL // All KERNEL #defines and routines
51//#define NOUSER // All USER #defines and routines
52//#define NONLS // All NLS #defines and routines
53//#define NOMB // MB_* and MessageBox()
54#define NOMEMMGR // GMEM_*, LMEM_*, GHND, LHND, associated routines
55#define NOMETAFILE // typedef METAFILEPICT
56#define NOMINMAX // Macros min(a,b) and max(a,b)
57//#define NOMSG // typedef MSG and associated routines
58#define NOOPENFILE // OpenFile(), OemToAnsi, AnsiToOem, and OF_*
59#define NOSCROLL // SB_* and scrolling routines
60#define NOSERVICE // All Service Controller routines, SERVICE_ equates, etc.
61#define NOSOUND // Sound driver routines
62//#define NOTEXTMETRIC // typedef TEXTMETRIC and associated routines
63//#define NOWH // SetWindowsHook and WH_*
64//#define NOWINOFFSETS // GWL_*, GCL_*, associated routines
65#define NOCOMM // COMM driver routines
66#define NOKANJI // Kanji support stuff.
67#define NOHELP // Help engine interface.
68#define NOPROFILER // Profiler interface.
69#define NODEFERWINDOWPOS // DeferWindowPos routines
70#define NOMCX // Modem Configuration Extensions
71#define NOCRYPT
72#define NOTAPE
73#define NOIMAGE
74#define NOPROXYSTUB
75#define NORPC
76
77struct IUnknown;
78
79// Finally now we can include windows.h
80#include <Windows.h>
81
82
83#endif //PLATFORM_*
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127