X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/92976ab62b850005f9b1e506d0e5ccf2ed465c15..2de8030dbe61287fb398057d61dd22fe45078c1d:/src/msw/listctrl.cpp diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 950b6d809b..b55dddf5d2 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -21,7 +21,7 @@ #endif #ifndef WX_PRECOMP -#include "wx.h" +#include "wx/wx.h" #endif #if defined(__WIN95__) @@ -31,13 +31,15 @@ #include "wx/msw/private.h" -#ifndef __GNUWIN32__ +#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) #include #endif +#ifndef __TWIN32__ #ifdef __GNUWIN32__ #include "wx/msw/gnuwin32/extra.h" #endif +#endif static void wxConvertToMSWListItem(const wxListCtrl *ctrl, wxListItem& info, LV_ITEM& tvItem); static void wxConvertFromMSWListItem(const wxListCtrl *ctrl, wxListItem& info, LV_ITEM& tvItem, HWND getFullInfo = 0); @@ -100,7 +102,7 @@ bool wxListCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, con if ( want3D || wxStyleHasBorder(m_windowStyle) ) wstyle |= WS_BORDER; - wstyle |= LVS_SHAREIMAGELISTS; + wstyle |= LVS_SHAREIMAGELISTS | LVS_SHOWSELALWAYS ; m_baseStyle = wstyle; long oldStyle = 0; // Dummy @@ -463,7 +465,7 @@ wxTextCtrl* wxListCtrl::GetEditControl(void) const bool wxListCtrl::GetItem(wxListItem& info) const { LV_ITEM lvItem; -#ifdef __MINGW32__ +#ifdef __GNUWIN32__ memset(&lvItem, 0, sizeof(lvItem)); #else ZeroMemory(&lvItem, sizeof(lvItem)); // must set all fields to 0 @@ -482,6 +484,9 @@ bool wxListCtrl::GetItem(wxListItem& info) const lvItem.pszText = NULL; } + if (info.m_mask & wxLIST_MASK_DATA) + lvItem.mask |= LVIF_PARAM ; + if ( info.m_mask & wxLIST_MASK_STATE ) { lvItem.mask |= LVIF_STATE;