git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13319
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ( !::SetFocus(hWnd) )
{
if ( !::SetFocus(hWnd) )
{
+#if defined(__WXDEBUG__) && !defined(__WXMICROWIN__)
// was there really an error?
// was there really an error?
DWORD dwRes = ::GetLastError();
DWORD dwRes = ::GetLastError();
-#else
-
- DWORD dwRes = 0;
-#endif
- 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