Skip to content

Instantly share code, notes, and snippets.

@Eczbek
Last active March 13, 2024 15:45
Show Gist options
  • Save Eczbek/71ffebc480c4bebcdcdeab30cb28cc2f to your computer and use it in GitHub Desktop.
Save Eczbek/71ffebc480c4bebcdcdeab30cb28cc2f to your computer and use it in GitHub Desktop.
Macros to disable generally unwanted stuff from <windows.h> (from Veeloxfire)
#define NOATOM
#define NOCLIPBOARD
#define NOCOLOR
#define NOCOMM
#define NOCTLMGR
#define NODEFERWINDOWPOS
#define NODRAWTEXT
#define NOGDI
#define NOGDICAPMASKS
#define NOICONS
#define NOKANJI
#define NOKERNEL
#define NOKEYSTATES
#define NOMB
#define NOMCX
#define NOMEMMGR
#define NOMENUS
#define NOMETAFILE
#define NOMINMAX
#define NOMSG
#define NONLS
#define NOOPENFILE
#define NOPROFILER
#define NORASTEROPS
#define NOSCROLL
#define NOSERVICE
#define NOSHOWWINDOW
#define NOSOUND
#define NOSYSCOMMANDS
#define NOSYSMETRICS
#define NOTEXTMETRIC
#define NOUSER
#define NOVIRTUALKEYCODES
#define NOWH
#define NOWINMESSAGES
#define NOWINOFFSETS
#define NOWINSTYLES
#define OEMRESOURCE
#define OHELP
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef NOATOM
#undef NOCLIPBOARD
#undef NOCOLOR
#undef NOCOMM
#undef NOCTLMGR
#undef NODEFERWINDOWPOS
#undef NODRAWTEXT
#undef NOGDI
#undef NOGDICAPMASKS
#undef NOICONS
#undef NOKANJI
#undef NOKERNEL
#undef NOKEYSTATES
#undef NOMB
#undef NOMCX
#undef NOMEMMGR
#undef NOMENUS
#undef NOMETAFILE
#undef NOMINMAX
#undef NOMSG
#undef NONLS
#undef NOOPENFILE
#undef NOPROFILER
#undef NORASTEROPS
#undef NOSCROLL
#undef NOSERVICE
#undef NOSHOWWINDOW
#undef NOSOUND
#undef NOSYSCOMMANDS
#undef NOSYSMETRICS
#undef NOTEXTMETRIC
#undef NOUSER
#undef NOVIRTUALKEYCODES
#undef NOWH
#undef NOWINMESSAGES
#undef NOWINOFFSETS
#undef NOWINSTYLES
#undef OEMRESOURCE
#undef OHELP
#undef WIN32_LEAN_AND_MEAN
#undef APIENTRY
#undef APIPRIVATE
#undef CALLBACK
#undef CDECL
#undef CONST
#undef FALSE
#undef FAR
#undef IN
#undef NEAR
#undef OPTIONAL
#undef OUT
#undef PASCAL
#undef STRICT
#undef TRUE
#undef VOID
#undef far
#undef near
#undef pascal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment