]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/slider95.cpp
implement wxListBox::EnsureVisible() in wxGTK; add a test for it to the widgets sample
[wxWidgets.git] / src / msw / slider95.cpp
index 3a0dbfb80ea7874f44aac6bf8418b8f0319386ea..1ebdb425dce97d8f5f4873a7fe1f9d5f8abe0bc2 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)lblid.GetValue(),
+                            wxGetInstance(),
+                            NULL
+                         );
+
+            m_labels->Set(n, wnd, lblid);
         }
 
         m_labels->SetFont(GetFont());