changed LVHITTESTINFO to LV_HITTESTINFO
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e43cab59ed
commit
9bfa7bfcbd
@ -1350,29 +1350,29 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
NM_RCLICK waits for the WM_RBUTTONUP message as well before firing off.
|
NM_RCLICK waits for the WM_RBUTTONUP message as well before firing off.
|
||||||
We want to have notify events for both down -and- up. */
|
We want to have notify events for both down -and- up. */
|
||||||
{
|
{
|
||||||
// if the user processes it in wxEVT_COMMAND_RIGHT_CLICK(), don't do
|
// if the user processes it in wxEVT_COMMAND_RIGHT_CLICK(), don't do
|
||||||
// anything else
|
// anything else
|
||||||
if ( wxControl::MSWOnNotify(idCtrl, lParam, result) ) {
|
if ( wxControl::MSWOnNotify(idCtrl, lParam, result) ) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
|
||||||
|
|
||||||
// else translate it into wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK event
|
|
||||||
LVHITTESTINFO lvhti;
|
|
||||||
#ifdef __GNUWIN32__
|
|
||||||
memset(&lvhti,0,sizeof(LVHITTESTINFO));
|
|
||||||
#else
|
|
||||||
ZeroMemory(&lvhti, sizeof(LVHITTESTINFO)); // must set all fields to 0
|
|
||||||
#endif
|
|
||||||
::GetCursorPos(&(lvhti.pt));
|
|
||||||
::ScreenToClient(GetHwnd(),&(lvhti.pt));
|
|
||||||
if(ListView_HitTest(GetHwnd(),&lvhti)!=-1) {
|
|
||||||
if(lvhti.flags & LVHT_ONITEM) {
|
|
||||||
eventType = wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK;
|
|
||||||
event.m_itemIndex = lvhti.iItem;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// else translate it into wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK event
|
||||||
|
LV_HITTESTINFO lvhti;
|
||||||
|
#ifdef __GNUWIN32__
|
||||||
|
memset(&lvhti,0,sizeof(LV_HITTESTINFO));
|
||||||
|
#else
|
||||||
|
ZeroMemory(&lvhti, sizeof(LV_HITTESTINFO)); // must set all fields to 0
|
||||||
|
#endif
|
||||||
|
::GetCursorPos(&(lvhti.pt));
|
||||||
|
::ScreenToClient(GetHwnd(),&(lvhti.pt));
|
||||||
|
if(ListView_HitTest(GetHwnd(),&lvhti)!=-1) {
|
||||||
|
if(lvhti.flags & LVHT_ONITEM) {
|
||||||
|
eventType = wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK;
|
||||||
|
event.m_itemIndex = lvhti.iItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
case NM_MCLICK: // ***** THERE IS NO NM_MCLICK. Subclass anyone? ******
|
case NM_MCLICK: // ***** THERE IS NO NM_MCLICK. Subclass anyone? ******
|
||||||
|
Loading…
Reference in New Issue
Block a user