From a8c05945b4e7dc87fb216466b29d3afcbf712169 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 27 Oct 2021 21:38:41 +0100 Subject: [PATCH] Log the length of the window label if creating it fails in wxMSW This can be useful in case of unexpected window creation failure, so log it because it doesn't cost much for something that is supposed to practically never happen anyhow. --- src/msw/window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 87d3486ae8..449ad39e3f 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -4049,8 +4049,8 @@ WXHWND wxWindowMSW::MSWCreateWindowAtAnyPosition(WXDWORD exStyle, const wxChar* { wxLogLastError(wxString::Format ( - wxT("CreateWindowEx(\"%s\", flags=%08lx, ex=%08lx)"), - clName, style, exStyle + wxT("CreateWindowEx(\"%s\", flags=%08lx, ex=%08lx, title-len=%zu)"), + clName, style, exStyle, title ? wxStrlen(title) : 0 )); } else if ( !IsTopLevel() && !MSWIsPositionDirectlySupported(x, y) )