]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/slider95.cpp
compilation fix after last change
[wxWidgets.git] / src / msw / slider95.cpp
index 159e0ddea3493c94e62291caeeacb4fd54c9e7c6..1ebdb425dce97d8f5f4873a7fe1f9d5f8abe0bc2 100644 (file)
@@ -135,7 +135,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
 void wxSlider::Init()
 {
     m_labels = NULL;
-    m_labelIds = NULL;
 
     m_pageSize = 1;
     m_lineSize = 1;
@@ -205,24 +204,25 @@ wxSlider::Create(wxWindow *parent,
     if ( m_windowStyle & wxSL_LABELS )
     {
         m_labels = new wxSubwindows(SliderLabel_Last);
-        m_labelIds = new wxWindowIDRef[SliderLabel_Last];
 
         HWND hwndParent = GetHwndOf(parent);
         for ( size_t n = 0; n < SliderLabel_Last; n++ )
         {
-            m_labelIds[n] = NewControlId();
-
-            (*m_labels)[n] = ::CreateWindow
-                               (
-                                    wxT("STATIC"),
-                                    NULL,
-                                    WS_CHILD | WS_VISIBLE | SS_CENTER,
-                                    0, 0, 0, 0,
-                                    hwndParent,
-                                    (HMENU)(wxWindowID)m_labelIds[n],
-                                    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());
@@ -286,7 +286,6 @@ WXDWORD wxSlider::MSWGetStyle(long style, WXDWORD *exstyle) const
 wxSlider::~wxSlider()
 {
     delete m_labels;
-    delete[] m_labelIds;
 }
 
 // ----------------------------------------------------------------------------