]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/slider95.cpp
added wxRESERVE_SPACE_EVEN_IF_HIDDEN sizer flag that prevents the sizer from changing...
[wxWidgets.git] / src / msw / slider95.cpp
index 3a0dbfb80ea7874f44aac6bf8418b8f0319386ea..5eabd63b7dc049a986d26a23867cf70c80ea0785 100644 (file)
@@ -208,17 +208,21 @@ wxSlider::Create(wxWindow *parent,
         HWND hwndParent = GetHwndOf(parent);
         for ( size_t n = 0; n < SliderLabel_Last; n++ )
         {
-            (*m_labels)[n] = ::CreateWindow
-                               (
-                                    wxT("STATIC"),
-                                    NULL,
-                                    WS_CHILD | WS_VISIBLE | SS_CENTER,
-                                    0, 0, 0, 0,
-                                    hwndParent,
-                                    (HMENU)NewControlId(),
-                                    wxGetInstance(),
-                                    NULL
-                               );
+            wxWindowIDRef lblid = NewControlId();
+
+            HWND wnd = ::CreateWindow
+                         (
+                            wxT("STATIC"),
+                            NULL,
+                            WS_CHILD | WS_VISIBLE | SS_CENTER,
+                            0, 0, 0, 0,
+                            hwndParent,
+                            (HMENU)wxUIntToPtr(lblid.GetValue()),
+                            wxGetInstance(),
+                            NULL
+                         );
+
+            m_labels->Set(n, wnd, lblid);
         }
 
         m_labels->SetFont(GetFont());