]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/nativdlg.cpp
added test for writing empty value to the config
[wxWidgets.git] / src / msw / nativdlg.cpp
index ce9a5db6b8555e67b6f82562f198039214a103b0..d77267951f3c00fe5f17cc8ea7a499026a13b09f 100644 (file)
@@ -239,17 +239,19 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
     {
         win = new wxScrollBar;
     }
-#if defined(__WIN95__) && !defined(__TWIN32__)
+#if defined(__WIN95__) && !defined(__TWIN32__) && wxUSE_SPINBTN
     else if (str == wxT("MSCTLS_UPDOWN32"))
     {
         win = new wxSpinButton;
     }
 #endif
+#if wxUSE_SLIDER
     else if (str == wxT("MSCTLS_TRACKBAR32"))
     {
         // Need to ascertain if it's horiz or vert
         win = new wxSlider;
     }
+#endif // wxUSE_SLIDER
     else if (str == wxT("STATIC"))
     {
         int style1 = (style & 0xFF);
@@ -282,11 +284,9 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
         win->SubclassWin(hWnd);
         win->AdoptAttributesFromHWND();
         win->SetupColours();
-
-        return win;
     }
-    else
-        return NULL;
+
+    return win;
 }
 
 // Make sure the window style (etc.) reflects the HWND style (roughly)