[Libreoffice-commits] core.git: odk/examples

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 20 10:14:02 UTC 2021


 odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1405f98b6e0fc43d41c3b8f16923589eccd08495
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Sep 20 10:08:02 2021 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Sep 20 12:13:29 2021 +0200

    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 at redhat.com>

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 );
     }
 


More information about the Libreoffice-commits mailing list