- m_windowStyle = flag;
-
- UpdateStyle();
-}
-
-// Can be just a single style, or a bitlist
-long wxListCtrl::ConvertToMSWStyle(long& oldStyle, long style) const
-{
- long wstyle = 0;
- if ( style & wxLC_ICON )
- {
- if ( (oldStyle & LVS_TYPEMASK) == LVS_SMALLICON )
- oldStyle -= LVS_SMALLICON;
- if ( (oldStyle & LVS_TYPEMASK) == LVS_REPORT )
- oldStyle -= LVS_REPORT;
- if ( (oldStyle & LVS_TYPEMASK) == LVS_LIST )
- oldStyle -= LVS_LIST;
- wstyle |= LVS_ICON;
- }
-
- if ( style & wxLC_SMALL_ICON )
- {
- if ( (oldStyle & LVS_TYPEMASK) == LVS_ICON )
- oldStyle -= LVS_ICON;
- if ( (oldStyle & LVS_TYPEMASK) == LVS_REPORT )
- oldStyle -= LVS_REPORT;
- if ( (oldStyle & LVS_TYPEMASK) == LVS_LIST )
- oldStyle -= LVS_LIST;
- wstyle |= LVS_SMALLICON;
- }
-
- if ( style & wxLC_LIST )
- {
- if ( (oldStyle & LVS_TYPEMASK) == LVS_ICON )
- oldStyle -= LVS_ICON;
- if ( (oldStyle & LVS_TYPEMASK) == LVS_REPORT )
- oldStyle -= LVS_REPORT;
- if ( (oldStyle & LVS_TYPEMASK) == LVS_SMALLICON )
- oldStyle -= LVS_SMALLICON;
- wstyle |= LVS_LIST;
- }
-
- if ( style & wxLC_REPORT )
- {
- if ( (oldStyle & LVS_TYPEMASK) == LVS_ICON )
- oldStyle -= LVS_ICON;
- if ( (oldStyle & LVS_TYPEMASK) == LVS_LIST )
- oldStyle -= LVS_LIST;
- if ( (oldStyle & LVS_TYPEMASK) == LVS_SMALLICON )
- oldStyle -= LVS_SMALLICON;
-
- wstyle |= LVS_REPORT;
- }
-
- if ( style & wxLC_ALIGN_LEFT )
- {
- if ( oldStyle & LVS_ALIGNTOP )
- oldStyle -= LVS_ALIGNTOP;
- wstyle |= LVS_ALIGNLEFT;
- }
-
- if ( style & wxLC_ALIGN_TOP )
- {
- if ( oldStyle & LVS_ALIGNLEFT )
- oldStyle -= LVS_ALIGNLEFT;
- wstyle |= LVS_ALIGNTOP;
- }
-
- if ( style & wxLC_AUTOARRANGE )
- wstyle |= LVS_AUTOARRANGE;
-
- if ( style & wxLC_NO_SORT_HEADER )
- wstyle |= LVS_NOSORTHEADER;
-
- if ( style & wxLC_NO_HEADER )
- wstyle |= LVS_NOCOLUMNHEADER;
-
- if ( style & wxLC_EDIT_LABELS )
- wstyle |= LVS_EDITLABELS;
-
- if ( style & wxLC_SINGLE_SEL )
- wstyle |= LVS_SINGLESEL;
-
- if ( style & wxLC_SORT_ASCENDING )
- {
- if ( oldStyle & LVS_SORTDESCENDING )
- oldStyle -= LVS_SORTDESCENDING;
- wstyle |= LVS_SORTASCENDING;
- }
-
- if ( style & wxLC_SORT_DESCENDING )