]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
Use standard IDC_HELP cursor instead of oversize custom cursor.
[wxWidgets.git] / src / msw / listctrl.cpp
index d8dc711e4447c1445c16c0fd0ca7c25d53374a84..ff95a5ce0e22a72eee81fbe3493a9cc9cf302845 100644 (file)
@@ -1241,21 +1241,21 @@ wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass)
 {
     wxASSERT( (textControlClass->IsKindOf(CLASSINFO(wxTextCtrl))) );
 
-    // VS: ListView_EditLabel requires that the list has focus.
+    // ListView_EditLabel requires that the list has focus.
     SetFocus();
-    HWND hWnd = (HWND) ListView_EditLabel(GetHwnd(), item);
+    WXHWND hWnd = (WXHWND) ListView_EditLabel(GetHwnd(), item);
 
     if (m_textCtrl)
     {
         m_textCtrl->SetHWND(0);
         m_textCtrl->UnsubclassWin();
         delete m_textCtrl;
-        m_textCtrl = NULL;
     }
 
     m_textCtrl = (wxTextCtrl*) textControlClass->CreateObject();
-    m_textCtrl->SetHWND((WXHWND) hWnd);
-    m_textCtrl->SubclassWin((WXHWND) hWnd);
+    m_textCtrl->SetHWND(hWnd);
+    m_textCtrl->SubclassWin(hWnd);
+    m_textCtrl->SetParent(this);
 
     return m_textCtrl;
 }
@@ -1539,7 +1539,10 @@ bool wxListCtrl::SortItems(wxListCtrlCompare fn, long data)
     internalData.user_fn = fn;
     internalData.data = data;
 
-    if ( !ListView_SortItems(GetHwnd(), wxInternalDataCompareFunc, &internalData) )
+    // WPARAM cast is needed for mingw/cygwin
+    if ( !ListView_SortItems(GetHwnd(),
+                             wxInternalDataCompareFunc,
+                             (WPARAM) &internalData) )
     {
         wxLogDebug(_T("ListView_SortItems() failed"));