From 6f64d8e3949e5629a657f1f1b95108fbf881198a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 10 Aug 2014 16:11:30 +0000 Subject: [PATCH] Use NMTVDISPINFO instead of TV_DISPINFO in wxMSW code. The latest w32api 4.0.3, used by MinGW project, still didn't manage to apply a one line fix to define TV_DISPINFO correctly, so tweak our sources to avoid using it. See #15537. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/msw/treectrl.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 35fb351d8d..818f86ad67 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -598,6 +598,7 @@ wxGTK: wxMSW: - Fix Cygwin 1.7 build. +- Work around a bug in MinGW 4.8 headers and fix build with it too. - Include x64 configurations in MSVC 8/9 project files too. - Fix parallel build of MSVC 11/12 solutions (Artur Wieczorek). - Fix background of wxRadioBox buttons and wxSlider (Artur Wieczorek). diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 9cb47cd9e5..754ea316c3 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -3277,7 +3277,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) case TVN_BEGINLABELEDIT: { eventType = wxEVT_TREE_BEGIN_LABEL_EDIT; - TV_DISPINFO *info = (TV_DISPINFO *)lParam; + NMTVDISPINFO *info = (NMTVDISPINFO *)lParam; // although the user event handler may still veto it, it is // important to set it now so that calls to SetItemText() from @@ -3311,7 +3311,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) case TVN_ENDLABELEDIT: { eventType = wxEVT_TREE_END_LABEL_EDIT; - TV_DISPINFO *info = (TV_DISPINFO *)lParam; + NMTVDISPINFO *info = (NMTVDISPINFO *)lParam; event.m_item = info->item.hItem; event.m_label = info->item.pszText; @@ -3355,7 +3355,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) eventType = wxEVT_TREE_SET_INFO; //else: get, already set above - TV_DISPINFO *info = (TV_DISPINFO *)lParam; + NMTVDISPINFO *info = (NMTVDISPINFO *)lParam; event.m_item = info->item.hItem; break; @@ -3857,7 +3857,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) //if ( /* !processed && */ ) { wxTreeItemId item = event.m_item; - TV_DISPINFO *info = (TV_DISPINFO *)lParam; + NMTVDISPINFO *info = (NMTVDISPINFO *)lParam; const wxTreeItemParam * const param = GetItemParam(item); if ( !param )