From 46b1cd0ff88de61226f7662302322b96c2399ee8 Mon Sep 17 00:00:00 2001 From: RamonUnch <74856804+RamonUnch@users.noreply.github.com> Date: Sun, 1 Jan 2023 16:00:56 +0100 Subject: [PATCH] More define and Win64 fix --- kilib/window.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kilib/window.cpp b/kilib/window.cpp index 31487949..3c646564 100644 --- a/kilib/window.cpp +++ b/kilib/window.cpp @@ -665,8 +665,10 @@ LRESULT CALLBACK WndImpl::StartProc( ThisAndParam* pz = static_cast(cs->lpCreateParams); WndImpl* pThis = pz->pThis; cs->lpCreateParams = pz->pParam; + #ifdef NO_ASM + // Store the this pointer in GWLP_USERDATA when not using ASM thunking ::SetWindowLongPtr(wnd, GWLP_USERDATA, reinterpret_cast(pThis)); - + #endif // ƒTƒ“ƒN pThis->SetUpThunk( wnd ); @@ -717,10 +719,10 @@ void WndImpl::SetUpThunk( HWND wnd ) } #ifdef NO_ASM -// To avoid ASM thunking we can use GWL_USERDATA in the window structure +// To avoid ASM thunking we can use GWLP_USERDATA in the window structure LRESULT CALLBACK WndImpl::TrunkMainProc( HWND wnd, UINT msg, WPARAM wp, LPARAM lp ) { - WndImpl* pThis = reinterpret_cast(GetWindowLong(wnd, GWL_USERDATA)); + WndImpl* pThis = reinterpret_cast(GetWindowLong(wnd, GWLP_USERDATA)); if(pThis) { return WndImpl::MainProc(pThis, msg, wp, lp); } else {