diff --git a/src/msw/control.cpp b/src/msw/control.cpp index ee938571d0..a99586da5c 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -154,8 +154,13 @@ bool wxControl::MSWCreateControl(const wxChar *classname, if ( !m_hWnd ) { - wxLogDebug(wxT("Failed to create a control of class '%s'"), classname); - wxFAIL_MSG(_T("something is very wrong, CreateWindowEx failed")); +#ifdef __WXDEBUG__ + wxFAIL_MSG(wxString::Format + ( + _T("CreateWindowEx(\"%s\", flags=%08x, ex=%08x) failed"), + classname, style, exstyle + )); +#endif // __WXDEBUG__ return false; }