X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80a81a12af49ab6acdaf0b62f4aa55e56f45ac6d..e8b7a986a6e8257dbcf2c04183ec2924e7906fd4:/src/msw/listctrl.cpp?ds=sidebyside diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index f548be6ac3..afee0618c9 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -48,7 +48,9 @@ #if defined(__WXWINCE__) #include #include - #include + #if _WIN32_WCE < 400 + #include + #endif #endif // include "properly" @@ -1808,9 +1810,9 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) event.m_col = nmHDR->iItem; break; -#ifdef __WXWINCE__ +#if defined(__WXWINCE__) && _WIN32_WCE < 400 case GN_CONTEXTMENU: -#endif __WXWINCE__ +#endif //__WXWINCE__ case NM_RCLICK: { eventType = wxEVT_COMMAND_LIST_COL_RIGHT_CLICK; @@ -1822,6 +1824,11 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) // where did the click occur? POINT ptClick; +#if defined(__WXWINCE__) && _WIN32_WCE < 400 + if(nmhdr->code == GN_CONTEXTMENU) { + ptClick = ((NMRGINFO*)nmhdr)->ptAction; + } else +#endif //__WXWINCE__ if ( !::GetCursorPos(&ptClick) ) { wxLogLastError(_T("GetCursorPos")); @@ -2137,9 +2144,9 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) event.m_item.m_data = GetItemData(iItem); break; -#ifdef __WXWINCE__ +#if defined(__WXWINCE__) && _WIN32_WCE < 400 case GN_CONTEXTMENU: -#endif __WXWINCE__ +#endif //__WXWINCE__ case NM_RCLICK: // if the user processes it in wxEVT_COMMAND_RIGHT_CLICK(), // don't do anything else @@ -2152,6 +2159,11 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) LV_HITTESTINFO lvhti; wxZeroMemory(lvhti); +#if defined(__WXWINCE__) && _WIN32_WCE < 400 + if(nmhdr->code == GN_CONTEXTMENU) { + lvhti.pt = ((NMRGINFO*)nmhdr)->ptAction; + } else +#endif //__WXWINCE__ ::GetCursorPos(&(lvhti.pt)); ::ScreenToClient(GetHwnd(),&(lvhti.pt)); if ( ListView_HitTest(GetHwnd(),&lvhti) != -1 ) @@ -2766,5 +2778,20 @@ static void wxConvertToMSWListCol(int WXUNUSED(col), const wxListItem& item, #endif // _WIN32_IE >= 0x0300 } +wxListView::wxListView() +{ +} + +wxListView::wxListView(wxWindow *parent, + wxWindowID winid, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString &name) +{ + Create(parent, winid, pos, size, style, validator, name); +} + #endif // wxUSE_LISTCTRL