diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 6c5ff9ea91..4d5e1c704b 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -238,9 +238,14 @@ const wxChar *wxGetMessageName(int message); inline void wxTraceMSWMessage(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { + // The casts to size_t allow to avoid having different code for Win32 and + // Win64 as size_t is of the right size in both cases, unlike int or long. wxLogTrace("winmsg", - wxT("Processing %s(hWnd=%p, wParam=%p, lParam=%p)"), - wxGetMessageName(message), hWnd, wParam, lParam); + wxT("Processing %s(hWnd=%p, wParam=%zx, lParam=%zx)"), + wxGetMessageName(message), + hWnd, + static_cast(wParam), + static_cast(lParam)); } #endif // wxDEBUG_LEVEL >= 2