diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/KM_platform.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/KM_platform.h b/src/KM_platform.h index 54d5f27..436e6e9 100644 --- a/src/KM_platform.h +++ b/src/KM_platform.h @@ -42,6 +42,37 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # define WIN32_LEAN_AND_MEAN # define VC_EXTRALEAN # include <windows.h> +/* we like the "SendMessage" name, so get rid of the preprocessor define + * and replace with an inline function */ +# undef SendMessage +#ifdef UNICODE
+inline
+WINUSERAPI
+LRESULT
+WINAPI
+SendMessage(
+ __in HWND hWnd,
+ __in UINT Msg,
+ __in WPARAM wParam,
+ __in LPARAM lParam)
+{
+ return SendMessageW(hWnd, Msg, wParam, lParam);
+}
+#else
+inline
+WINUSERAPI
+LRESULT
+WINAPI
+SendMessage(
+ __in HWND hWnd,
+ __in UINT Msg,
+ __in WPARAM wParam,
+ __in LPARAM lParam)
+{
+ return SendMessageA(hWnd, Msg, wParam, lParam);
+}
+#endif // !UNICODE
+ # include <stdlib.h> # include <stdio.h> # include <stdarg.h> |
