diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 8e2a0e4267..9015f5cf73 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -1368,10 +1368,13 @@ void wxToolBar::OnEraseBackground(wxEraseEvent& event) { HRESULT hr = theme->DrawThemeParentBackground(GetHwnd(), hdc, &rect); - if ( SUCCEEDED(hr) ) + if ( hr == S_OK ) return; - wxLogApiError(_T("DrawThemeParentBackground(toolbar)"), hr); + // it can also return S_FALSE which seems to simply say that it + // didn't draw anything but no error really occurred + if ( FAILED(hr) ) + wxLogApiError(_T("DrawThemeParentBackground(toolbar)"), hr); } } #endif // wxUSE_UXTHEME