0, LVS_EX_FULLROWSELECT);
}
- SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
+ SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
SetForegroundColour(GetParent()->GetForegroundColour());
SubclassWin(m_hWnd);
wxConvertToMSWFlags(state, stateMask, lvItem);
// for the virtual list controls we need to refresh the previously focused
- // item manually when changing focus programmatically because otherwise it
- // keeps its focus rectangle until next repaint (yet another comctl32 bug)
+ // item manually when changing focus without changing selection
+ // programmatically because otherwise it keeps its focus rectangle until
+ // next repaint (yet another comctl32 bug)
long focusOld;
if ( IsVirtual() &&
(stateMask & wxLIST_STATE_FOCUSED) &&
if ( focusOld != -1 )
{
- RefreshItem(focusOld);
+ // no need to refresh the item if it was previously selected, it would
+ // only result in annoying flicker
+ if ( !(GetItemState(focusOld,
+ wxLIST_STATE_SELECTED) & wxLIST_STATE_SELECTED) )
+ {
+ RefreshItem(focusOld);
+ }
}
return TRUE;
// if your compiler is as broken as this, you should really change it: this
// code is needed for normal operation! #ifdef below is only useful for
// automatic rebuilds which are done with a very old compiler version
-#ifdef LVM_FIRST
+#ifdef HDN_BEGINTRACKA
// check for messages from the header (in report view)
HWND hwndHdr = ListView_GetHeader(GetHwnd());
// is it a message from the header?
if ( nmhdr->hwndFrom == hwndHdr )
{
- NMHEADER *nmHDR = (NMHEADER *)nmhdr;
+ HD_NOTIFY *nmHDR = (HD_NOTIFY *)nmhdr;
+
event.m_itemIndex = -1;
switch ( nmhdr->code )
}
}
else
-#endif // defined(LVM_FIRST)
+#endif // defined(HDN_BEGINTRACKA)
if ( nmhdr->hwndFrom == GetHwnd() )
{
// almost all messages use NM_LISTVIEW
if ((GetWindowStyle() & wxLC_REPORT) == 0)
return;
- wxPen pen(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
+ wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
dc.SetPen(pen);
dc.SetBrush(* wxTRANSPARENT_BRUSH);
lvItem.mask |= LVIF_PARAM;
}
-static void wxConvertToMSWListCol(int col, const wxListItem& item,
+static void wxConvertToMSWListCol(int WXUNUSED(col), const wxListItem& item,
LV_COLUMN& lvCol)
{
wxZeroMemory(lvCol);