X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fbe747340603a0b5d2cf4152c7e27581244a44bc..eea4d01c65f9b29baa1193db762b4c6b8144af24:/src/msw/listctrl.cpp diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index fbcfbe7a6d..1e1c9a722c 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1442,7 +1442,7 @@ void wxListCtrl::InitEditControl(WXHWND hWnd) m_textCtrl->SubclassWin(hWnd); m_textCtrl->SetParent(this); - // we must disallow TABbing away from the control while the edit contol is + // we must disallow TABbing away from the control while the edit control is // shown because this leaves it in some strange state (just try removing // this line and then pressing TAB while editing an item in listctrl // inside a panel) @@ -1727,7 +1727,9 @@ long wxListCtrl::InsertItem(long index, const wxString& label, int imageIndex) wxListItem info; info.m_image = imageIndex; info.m_text = label; - info.m_mask = wxLIST_MASK_IMAGE | wxLIST_MASK_TEXT; + info.m_mask = wxLIST_MASK_TEXT; + if (imageIndex > -1) + info.m_mask |= wxLIST_MASK_IMAGE; info.m_itemId = index; return InsertItem(info); } @@ -1821,8 +1823,8 @@ int CALLBACK wxInternalDataCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM l wxMSWListItemData *data1 = (wxMSWListItemData *) lParam1; wxMSWListItemData *data2 = (wxMSWListItemData *) lParam2; - long d1 = (data1 == NULL ? 0 : data1->lParam); - long d2 = (data2 == NULL ? 0 : data2->lParam); + wxIntPtr d1 = (data1 == NULL ? 0 : data1->lParam); + wxIntPtr d2 = (data2 == NULL ? 0 : data2->lParam); return internalData->user_fn(d1, d2, internalData->data);