]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/nativdlg.cpp
pc 2 mac conversion for file operations
[wxWidgets.git] / src / msw / nativdlg.cpp
index 5d251c9cc8d86d52c1760c8e61cfa0909bb39f08..0b2b1ee94e81df75d52c86999484903654ca3120 100644 (file)
@@ -34,7 +34,7 @@
     #include "wx/wx.h"
 #endif
 
-#if defined(__WIN95__) && !defined(__TWIN32__)
+#if defined(__WIN95__)
 #include "wx/spinbutt.h"
 #endif
 #include "wx/msw/private.h"
@@ -108,7 +108,20 @@ bool wxWindow::LoadNativeDialog(wxWindow* parent, const wxString& name)
     else
         wxTopLevelWindows.Append(this);
 
-    // FIXME why don't we enum all children here?
+    // Enumerate all children
+    HWND hWndNext;
+    hWndNext = ::GetWindow((HWND) m_hWnd, GW_CHILD);
+
+    wxWindow* child = NULL;
+    if (hWndNext)
+        child = CreateWindowFromHWND(this, (WXHWND) hWndNext);
+
+    while (hWndNext != (HWND) NULL)
+    {
+        hWndNext = ::GetWindow(hWndNext, GW_HWNDNEXT);
+        if (hWndNext)
+            child = CreateWindowFromHWND(this, (WXHWND) hWndNext);
+    }
 
     return TRUE;
 }
@@ -239,7 +252,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
     {
         win = new wxScrollBar;
     }
-#if defined(__WIN95__) && !defined(__TWIN32__) && wxUSE_SPINBTN
+#if defined(__WIN95__) && wxUSE_SPINBTN
     else if (str == wxT("MSCTLS_UPDOWN32"))
     {
         win = new wxSpinButton;