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:
@@ -450,23 +450,18 @@ void wxWindowMSW::SetFocus()
|
|||||||
|
|
||||||
if ( !::SetFocus(hWnd) )
|
if ( !::SetFocus(hWnd) )
|
||||||
{
|
{
|
||||||
|
#if defined(__WXDEBUG__) && !defined(__WXMICROWIN__)
|
||||||
// was there really an error?
|
// was there really an error?
|
||||||
#ifndef __WXMICROWIN__
|
|
||||||
DWORD dwRes = ::GetLastError();
|
DWORD dwRes = ::GetLastError();
|
||||||
#else
|
|
||||||
|
|
||||||
DWORD dwRes = 0;
|
|
||||||
#endif
|
|
||||||
if ( dwRes )
|
if ( dwRes )
|
||||||
{
|
{
|
||||||
wxLogApiError(_T("SetFocus"), dwRes);
|
HWND hwndFocus = ::GetFocus();
|
||||||
|
if ( hwndFocus != hWnd )
|
||||||
|
{
|
||||||
|
wxLogApiError(_T("SetFocus"), dwRes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
#endif // Debug
|
||||||
// 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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user