windows_push.hpp (3135B)
1 #ifndef _C4_WINDOWS_PUSH_HPP_ 2 #define _C4_WINDOWS_PUSH_HPP_ 3 4 /** @file windows_push.hpp sets up macros to include windows header files 5 * without pulling in all of <windows.h> 6 * 7 * @see #include windows_pop.hpp to undefine these macros 8 * 9 * @see https://aras-p.info/blog/2018/01/12/Minimizing-windows.h/ */ 10 11 12 #if defined(_WIN64) || defined(_WIN32) 13 14 #if defined(_M_AMD64) 15 # ifndef _AMD64_ 16 # define _c4_AMD64_ 17 # define _AMD64_ 18 # endif 19 #elif defined(_M_IX86) 20 # ifndef _X86_ 21 # define _c4_X86_ 22 # define _X86_ 23 # endif 24 #elif defined(_M_ARM64) 25 # ifndef _ARM64_ 26 # define _c4_ARM64_ 27 # define _ARM64_ 28 # endif 29 #elif defined(_M_ARM) 30 # ifndef _ARM_ 31 # define _c4_ARM_ 32 # define _ARM_ 33 # endif 34 #endif 35 36 #ifndef NOMINMAX 37 # define _c4_NOMINMAX 38 # define NOMINMAX 39 #endif 40 41 #ifndef NOGDI 42 # define _c4_NOGDI 43 # define NOGDI 44 #endif 45 46 #ifndef VC_EXTRALEAN 47 # define _c4_VC_EXTRALEAN 48 # define VC_EXTRALEAN 49 #endif 50 51 #ifndef WIN32_LEAN_AND_MEAN 52 # define _c4_WIN32_LEAN_AND_MEAN 53 # define WIN32_LEAN_AND_MEAN 54 #endif 55 56 /* If defined, the following flags inhibit definition 57 * of the indicated items. 58 * 59 * NOGDICAPMASKS - CC_*, LC_*, PC_*, CP_*, TC_*, RC_ 60 * NOVIRTUALKEYCODES - VK_* 61 * NOWINMESSAGES - WM_*, EM_*, LB_*, CB_* 62 * NOWINSTYLES - WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_* 63 * NOSYSMETRICS - SM_* 64 * NOMENUS - MF_* 65 * NOICONS - IDI_* 66 * NOKEYSTATES - MK_* 67 * NOSYSCOMMANDS - SC_* 68 * NORASTEROPS - Binary and Tertiary raster ops 69 * NOSHOWWINDOW - SW_* 70 * OEMRESOURCE - OEM Resource values 71 * NOATOM - Atom Manager routines 72 * NOCLIPBOARD - Clipboard routines 73 * NOCOLOR - Screen colors 74 * NOCTLMGR - Control and Dialog routines 75 * NODRAWTEXT - DrawText() and DT_* 76 * NOGDI - All GDI defines and routines 77 * NOKERNEL - All KERNEL defines and routines 78 * NOUSER - All USER defines and routines 79 * NONLS - All NLS defines and routines 80 * NOMB - MB_* and MessageBox() 81 * NOMEMMGR - GMEM_*, LMEM_*, GHND, LHND, associated routines 82 * NOMETAFILE - typedef METAFILEPICT 83 * NOMINMAX - Macros min(a,b) and max(a,b) 84 * NOMSG - typedef MSG and associated routines 85 * NOOPENFILE - OpenFile(), OemToAnsi, AnsiToOem, and OF_* 86 * NOSCROLL - SB_* and scrolling routines 87 * NOSERVICE - All Service Controller routines, SERVICE_ equates, etc. 88 * NOSOUND - Sound driver routines 89 * NOTEXTMETRIC - typedef TEXTMETRIC and associated routines 90 * NOWH - SetWindowsHook and WH_* 91 * NOWINOFFSETS - GWL_*, GCL_*, associated routines 92 * NOCOMM - COMM driver routines 93 * NOKANJI - Kanji support stuff. 94 * NOHELP - Help engine interface. 95 * NOPROFILER - Profiler interface. 96 * NODEFERWINDOWPOS - DeferWindowPos routines 97 * NOMCX - Modem Configuration Extensions 98 */ 99 100 #endif /* defined(_WIN64) || defined(_WIN32) */ 101 102 #endif /* _C4_WINDOWS_PUSH_HPP_ */