diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 3ee328dff5..99d64a87f3 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -2866,7 +2866,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) { // Ask the tree control what tooltip (if any) should be shown wxTreeEvent hevent(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, GetId()); - hevent.m_item = (long) hoverItem; + hevent.m_item = hoverItem; hevent.SetEventObject(this); if ( GetEventHandler()->ProcessEvent(hevent) && hevent.IsAllowed() ) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index a7c06e728e..862196ca69 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -2480,7 +2480,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) NMTVGETINFOTIP *info = (NMTVGETINFOTIP*)lParam; // Which item are we trying to get a tooltip for? - event.m_item = (WXHTREEITEM) info->hItem; + event.m_item = info->hItem; break; }