diff --git a/samples/widgets/widgets.cpp b/samples/widgets/widgets.cpp index 06bc4a7ac5..40eedbda7b 100644 --- a/samples/widgets/widgets.cpp +++ b/samples/widgets/widgets.cpp @@ -1236,7 +1236,8 @@ void WidgetsFrame::OnWidgetFocus(wxFocusEvent& event) // only log these events in our own logger. if ( wxGetApp().IsUsingLogWindow() ) { - wxLogMessage("Widgets %s focus", + wxWindow* win = (wxWindow*)event.GetEventObject(); + wxLogMessage("Widget '%s' %s focus", win->GetClassInfo()->GetClassName(), event.GetEventType() == wxEVT_SET_FOCUS ? "got" : "lost"); }