summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-09-20 10:08:02 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-09-20 12:13:29 +0200
commit1405f98b6e0fc43d41c3b8f16923589eccd08495 (patch)
tree554b533de95f69bc752d276e0df28ca42b6439ce
parent80bb2ab680ea889a4bcf7104e5c8b1bdce22c9f3 (diff)
Adapt SetWindowLong call to 64-bit build
This failed with GWL_WNDPROC being undefined in 64-bit builds. See the note at <https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowlongptra>: "To write code that is compatible with both 32-bit and 64-bit versions of Windows, use SetWindowLongPtr." Change-Id: I7abcc681b4daf459eb0c0481266949c75ecf4dda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122341 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c
index f7bef492022c..2de998c69475 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c
+++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c
@@ -122,7 +122,7 @@ JNIEXPORT jlong JNICALL Java_NativeView_getNativeWindow
*/
if (GetProp( hWnd, OLD_PROC_KEY )==0)
{
- hFuncPtr = SetWindowLong( hWnd, GWL_WNDPROC, (DWORD)NativeViewWndProc );
+ hFuncPtr = SetWindowLongPtr( hWnd, GWLP_WNDPROC, (LONG_PTR)NativeViewWndProc );
SetProp( hWnd, OLD_PROC_KEY, (HANDLE)hFuncPtr );
}