diff --git a/src/SFML/Window/Win32/WindowImplWin32.cpp b/src/SFML/Window/Win32/WindowImplWin32.cpp index 40fc5a4b0..c36c70dee 100644 --- a/src/SFML/Window/Win32/WindowImplWin32.cpp +++ b/src/SFML/Window/Win32/WindowImplWin32.cpp @@ -818,7 +818,7 @@ LRESULT CALLBACK WindowImplWin32::GlobalOnEvent(HWND handle, UINT message, WPARA if (message == WM_CREATE) { // Get WindowImplWin32 instance (it was passed as the last argument of CreateWindow) - long window = reinterpret_cast(reinterpret_cast(lParam)->lpCreateParams); + LONG_PTR window = (LONG_PTR)reinterpret_cast(lParam)->lpCreateParams; // Set as the "user data" parameter of the window SetWindowLongPtr(handle, GWLP_USERDATA, window);