]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
Applied patch [ 849212 ] Sets SO_REUSEADDR flag on server sockets
[wxWidgets.git] / src / msw / listctrl.cpp
index c6b15c64beb960da06f8280ca1ff99341df9a84f..afee0618c9660bbc0abde6825b32ebb793ab632f 100644 (file)
 
 #include "wx/msw/private.h"
 
+#if defined(__WXWINCE__)
+  #include <ole2.h>
+  #include <shellapi.h>
+  #if _WIN32_WCE < 400
+    #include <aygshell.h>
+  #endif
+#endif
+
 // include <commctrl.h> "properly"
 #include "wx/msw/wrapcctl.h"
 
@@ -1802,6 +1810,9 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                 event.m_col = nmHDR->iItem;
                 break;
 
+#if defined(__WXWINCE__) && _WIN32_WCE < 400
+            case GN_CONTEXTMENU:
+#endif //__WXWINCE__
             case NM_RCLICK:
                 {
                     eventType = wxEVT_COMMAND_LIST_COL_RIGHT_CLICK;
@@ -1813,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"));
@@ -2128,6 +2144,9 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                 event.m_item.m_data = GetItemData(iItem);
                 break;
 
+#if defined(__WXWINCE__) && _WIN32_WCE < 400
+            case GN_CONTEXTMENU:
+#endif //__WXWINCE__
             case NM_RCLICK:
                 // if the user processes it in wxEVT_COMMAND_RIGHT_CLICK(),
                 // don't do anything else
@@ -2140,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 )
@@ -2754,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