summaryrefslogtreecommitdiff
path: root/Tools/WinLauncher/WinLauncher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/WinLauncher/WinLauncher.cpp')
-rw-r--r--Tools/WinLauncher/WinLauncher.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/Tools/WinLauncher/WinLauncher.cpp b/Tools/WinLauncher/WinLauncher.cpp
index 0e47f9996..405d1b209 100644
--- a/Tools/WinLauncher/WinLauncher.cpp
+++ b/Tools/WinLauncher/WinLauncher.cpp
@@ -228,8 +228,13 @@ static void resizeSubViews()
static void subclassForLayeredWindow()
{
hMainWnd = gViewWindow;
- DefWebKitProc = reinterpret_cast<WNDPROC>(::GetWindowLongPtr(hMainWnd, GWL_WNDPROC));
- ::SetWindowLongPtr(hMainWnd, GWL_WNDPROC, reinterpret_cast<LONG_PTR>(WndProc));
+#if defined _M_AMD64 || defined _WIN64
+ DefWebKitProc = reinterpret_cast<WNDPROC>(::GetWindowLongPtr(hMainWnd, GWLP_WNDPROC));
+ ::SetWindowLongPtr(hMainWnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(WndProc));
+#else
+ DefWebKitProc = reinterpret_cast<WNDPROC>(::GetWindowLong(hMainWnd, GWL_WNDPROC));
+ ::SetWindowLong(hMainWnd, GWL_WNDPROC, reinterpret_cast<LONG_PTR>(WndProc));
+#endif
}
static void computeFullDesktopFrame()
@@ -314,8 +319,14 @@ extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(HINSTANCE, HIN
UpdateWindow(hMainWnd);
}
- DefEditProc = reinterpret_cast<WNDPROC>(GetWindowLongPtr(hURLBarWnd, GWL_WNDPROC));
- SetWindowLongPtr(hURLBarWnd, GWL_WNDPROC, reinterpret_cast<LONG_PTR>(MyEditProc));
+#if defined _M_AMD64 || defined _WIN64
+ DefEditProc = reinterpret_cast<WNDPROC>(GetWindowLongPtr(hURLBarWnd, GWLP_WNDPROC));
+ SetWindowLongPtr(hURLBarWnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(MyEditProc));
+#else
+ DefEditProc = reinterpret_cast<WNDPROC>(GetWindowLong(hURLBarWnd, GWL_WNDPROC));
+ SetWindowLong(hURLBarWnd, GWL_WNDPROC, reinterpret_cast<LONG_PTR>(MyEditProc));
+#endif
+
SetFocus(hURLBarWnd);
RECT clientRect = { s_windowPosition.x, s_windowPosition.y, s_windowPosition.x + s_windowSize.cx, s_windowPosition.y + s_windowSize.cy };