]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/nativdlg.cpp
check that the version of __sync_sub_and_fetch that returns a value is supported...
[wxWidgets.git] / src / msw / nativdlg.cpp
index 5e6ff9865a637e7c8240f2b7a2b50550a8ed67ba..0f86383b8d4ef0a64c67f352f0750d99ac686eb7 100644 (file)
@@ -146,20 +146,14 @@ wxWindow* wxWindow::GetWindowChild(wxWindowID id)
     wxWindow* win = GetWindowChild1(id);
     if ( !win )
     {
-        HWND hWnd = ::GetDlgItem((HWND) GetHWND(), id);
-
-        if (hWnd)
+        HWND hwnd = ::GetDlgItem(GetHwnd(), id);
+        if ( hwnd )
         {
-            wxWindow* child = CreateWindowFromHWND(this, (WXHWND) hWnd);
-            if (child)
-            {
-                child->AddChild(this);
-                return child;
-            }
+            win = CreateWindowFromHWND(this, (WXHWND) hwnd);
         }
     }
 
-    return NULL;
+    return win;
 }
 
 // ---------------------------------------------------------------------------