diff options
| author | msheby <msheby@cinecert.com> | 2010-09-14 19:21:47 +0000 |
|---|---|---|
| committer | msheby <> | 2010-09-14 19:21:47 +0000 |
| commit | b6fd53ca44570ef077932b468402dc6797e71f95 (patch) | |
| tree | e6968881248987948ff922137c128d979d773b88 /src | |
| parent | b6c72159c0f66da533114723fce699de209fe783 (diff) | |
Change "SendMessage" preprocessor define to inline function.
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> |
