Fixed EVT_TREE_SEL_CHANGED and _CHANGING under MSLU (patch 631815)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2397,20 +2397,34 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TVN_SELCHANGED:
|
// NB: MSLU is broken and sends TVN_SELCHANGEDA instead of
|
||||||
|
// TVN_SELCHANGEDW in Unicode mode under Win98. Therefore
|
||||||
|
// we have to handle both messages:
|
||||||
|
case TVN_SELCHANGEDA:
|
||||||
|
case TVN_SELCHANGEDW:
|
||||||
eventType = wxEVT_COMMAND_TREE_SEL_CHANGED;
|
eventType = wxEVT_COMMAND_TREE_SEL_CHANGED;
|
||||||
// fall through
|
// fall through
|
||||||
|
|
||||||
case TVN_SELCHANGING:
|
case TVN_SELCHANGINGA:
|
||||||
|
case TVN_SELCHANGINGW:
|
||||||
{
|
{
|
||||||
if ( eventType == wxEVT_NULL )
|
if ( eventType == wxEVT_NULL )
|
||||||
eventType = wxEVT_COMMAND_TREE_SEL_CHANGING;
|
eventType = wxEVT_COMMAND_TREE_SEL_CHANGING;
|
||||||
//else: already set above
|
//else: already set above
|
||||||
|
|
||||||
NM_TREEVIEW* tv = (NM_TREEVIEW *)lParam;
|
if (hdr->code == TVN_SELCHANGINGW ||
|
||||||
|
hdr->code == TVN_SELCHANGEDW)
|
||||||
event.m_item = (WXHTREEITEM) tv->itemNew.hItem;
|
{
|
||||||
event.m_itemOld = (WXHTREEITEM) tv->itemOld.hItem;
|
NM_TREEVIEWW* tv = (NM_TREEVIEWW *)lParam;
|
||||||
|
event.m_item = (WXHTREEITEM) tv->itemNew.hItem;
|
||||||
|
event.m_itemOld = (WXHTREEITEM) tv->itemOld.hItem;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NM_TREEVIEWA* tv = (NM_TREEVIEWA *)lParam;
|
||||||
|
event.m_item = (WXHTREEITEM) tv->itemNew.hItem;
|
||||||
|
event.m_itemOld = (WXHTREEITEM) tv->itemOld.hItem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user