X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad9f477da56634d82b6e26ee380dfa78dda52da0..5b2f31eb30be576374064413b9d0f63a1bf8c110:/src/msw/listctrl.cpp diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index be0e6c5bac..08fb275a28 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -68,6 +68,14 @@ #define LVS_OWNERDATA 0x1000 #endif +#ifndef LVM_FIRST + #define LVM_FIRST 0x1000 +#endif + +#ifndef HDM_FIRST + #define HDM_FIRST 0x1200 +#endif + // mingw32/cygwin don't have declarations for comctl32.dll 4.70+ stuff #ifndef NM_CACHEHINT typedef struct tagNMLVCACHEHINT @@ -280,7 +288,7 @@ bool wxListCtrl::DoCreateControl(int x, int y, int w, int h) 0, LVS_EX_FULLROWSELECT); } - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); SetForegroundColour(GetParent()->GetForegroundColour()); SubclassWin(m_hWnd); @@ -1501,7 +1509,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) // 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()); @@ -1509,7 +1517,8 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) // 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 ) @@ -1585,7 +1594,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) } } else -#endif // defined(LVM_FIRST) +#endif // defined(HDN_BEGINTRACKA) if ( nmhdr->hwndFrom == GetHwnd() ) { // almost all messages use NM_LISTVIEW @@ -2021,7 +2030,7 @@ void wxListCtrl::OnPaint(wxPaintEvent& event) 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); @@ -2338,7 +2347,7 @@ static void wxConvertToMSWListItem(const wxListCtrl *ctrl, 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);