Browse code

Use #pragma once instead of include guards.

Naram Qashat authored on 2014/09/08 14:47:36
Showing 1 changed files
... ...
@@ -3,8 +3,7 @@
3 3
  * http://learnwinapi.wordpress.com/2011/12/13/lesson-2-the-api-is-based-on-unicode/
4 4
  */
5 5
 
6
-#ifndef WINDOWSH_WRAPPER_H
7
-#define WINDOWSH_WRAPPER_H
6
+#pragma once
8 7
 
9 8
 #ifdef _MBCS
10 9
 # error "_MBCS (multi-byte character set) is defined, but only Unicode is supported"
... ...
@@ -29,5 +28,3 @@
29 28
 #undef WIN32_LEAN_AND_MEAN
30 29
 #define WIN32_LEAN_AND_MEAN
31 30
 #include <windows.h>
32
-
33
-#endif
Browse code

Import actual code.

Naram Qashat authored on 2013/03/26 02:41:19
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,33 @@
1
+/*
2
+ * Wrapper for windows.h, found at:
3
+ * http://learnwinapi.wordpress.com/2011/12/13/lesson-2-the-api-is-based-on-unicode/
4
+ */
5
+
6
+#ifndef WINDOWSH_WRAPPER_H
7
+#define WINDOWSH_WRAPPER_H
8
+
9
+#ifdef _MBCS
10
+# error "_MBCS (multi-byte character set) is defined, but only Unicode is supported"
11
+#endif
12
+#undef _UNICODE
13
+#define _UNICODE // For [tchar.h]
14
+#undef UNICODE
15
+#define UNICODE // For [windows.h]
16
+
17
+#undef NOMINMAX
18
+#define NOMINMAX // C++ standard library compatibility
19
+#undef STRICT
20
+#define STRICT // C++ type-checking compatibility
21
+
22
+#ifndef _WIN32_WINNT
23
+# define _WIN32_WINNT _WIN32_WINNT_WIN2K
24
+#endif
25
+#ifdef _MSC_VER // Visual C++ only (the SDK is Visual C++ specific).
26
+# include <SDKDDKVer.h> // E.g. g++ 4.4.1 does not support this file/scheme.
27
+#endif
28
+
29
+#undef WIN32_LEAN_AND_MEAN
30
+#define WIN32_LEAN_AND_MEAN
31
+#include <windows.h>
32
+
33
+#endif