]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/winundef.h
converted to 16 colors
[wxWidgets.git] / include / wx / msw / winundef.h
index ac2fa36577be717723e9cc00be3100735f4ab548..6af2f389ccb674df609449f3f2dc6f54df5f405a 100644 (file)
 #define _WX_WINUNDEF_H_
  */
 
-// windows.h #defines the following identifiers which are also used in wxWin
+// ----------------------------------------------------------------------------
+// windows.h #defines the following identifiers which are also used in wxWin so
+// we replace these symbols with the corresponding inline functions and
+// undefine the macro.
+//
+// This looks quite ugly here but allows us to write clear (and correct!) code
+// elsewhere because the functions, unlike the macros, respect the scope.
+// ----------------------------------------------------------------------------
 
 // GetCharWidth
 
    }
 #endif
 
+// GetMessage
 
 #ifdef GetMessage
    #undef GetMessage
    }
 #endif
 
+// LoadLibrary
+
+#ifdef LoadLibrary
+    #undef LoadLibrary
+    inline HINSTANCE LoadLibrary(LPCTSTR lpLibFileName)
+    {
+    #ifdef _UNICODE
+        return LoadLibraryW(lpLibFileName);
+    #else
+        return LoadLibraryA(lpLibFileName);
+    #endif
+    }
+#endif
+
 // For WINE
 
 #if defined(GetWindowStyle) || defined(__WXWINE__)