suppressed wrong debug error messages from SetFocus

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-01-03 00:42:57 +00:00
parent 6386110d02
commit 5262eb0a98

View File

@ -450,23 +450,18 @@ void wxWindowMSW::SetFocus()
if ( !::SetFocus(hWnd) )
{
#if defined(__WXDEBUG__) && !defined(__WXMICROWIN__)
// was there really an error?
#ifndef __WXMICROWIN__
DWORD dwRes = ::GetLastError();
#else
DWORD dwRes = 0;
#endif
if ( dwRes )
{
wxLogApiError(_T("SetFocus"), dwRes);
HWND hwndFocus = ::GetFocus();
if ( hwndFocus != hWnd )
{
wxLogApiError(_T("SetFocus"), dwRes);
}
}
// VZ: just why does this happen sometimes?? any idea?
#if 0
HWND hwndFocus = ::GetFocus();
wxASSERT_MSG( hwndFocus == hWnd, _T("SetFocus() didn't work?") );
#endif // 0
#endif // Debug
}
}