]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/treectrl.cpp
compilation fix for CE: don't use GetModuleHandleA() which doesn't exist there
[wxWidgets.git] / src / msw / treectrl.cpp
index b74ae1f2ae25b524821af14eda8e738c48586c0d..2a2bb3b124d954c622a037ff3cf422a662557259 100644 (file)
@@ -716,8 +716,8 @@ bool wxTreeCtrl::Create(wxWindow *parent,
         HDC hdcMem = CreateCompatibleDC(NULL);
 
         // create a mono bitmap of the standard size
-        int x = GetSystemMetrics(SM_CXMENUCHECK);
-        int y = GetSystemMetrics(SM_CYMENUCHECK);
+        int x = ::GetSystemMetrics(SM_CXMENUCHECK);
+        int y = ::GetSystemMetrics(SM_CYMENUCHECK);
         wxImageList imagelistCheckboxes(x, y, false, 2);
         HBITMAP hbmpCheck = CreateBitmap(x, y,   // bitmap size
                                          1,      // # of color planes
@@ -1719,6 +1719,26 @@ wxTreeItemId wxTreeCtrl::InsertItem(const wxTreeItemId& parent,
                         image, selImage, NULL);
 }
 
+wxImageList *wxTreeCtrl::GetImageList(int) const
+{
+    return GetImageList();
+}
+
+void wxTreeCtrl::SetImageList(wxImageList *imageList, int)
+{
+    SetImageList(imageList);
+}
+
+int wxTreeCtrl::GetItemSelectedImage(const wxTreeItemId& item) const
+{
+    return GetItemImage(item, wxTreeItemIcon_Selected);
+}
+
+void wxTreeCtrl::SetItemSelectedImage(const wxTreeItemId& item, int image)
+{
+    SetItemImage(item, image, wxTreeItemIcon_Selected);
+}
+
 #endif // WXWIN_COMPATIBILITY_2_4
 
 wxTreeItemId wxTreeCtrl::AddRoot(const wxString& text,
@@ -1900,10 +1920,12 @@ void wxTreeCtrl::Toggle(const wxTreeItemId& item)
 }
 
 #if WXWIN_COMPATIBILITY_2_4
+
 void wxTreeCtrl::ExpandItem(const wxTreeItemId& item, int action)
 {
     DoExpand(item, action);
 }
+
 #endif
 
 void wxTreeCtrl::Unselect()
@@ -2219,15 +2241,17 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
     WXLRESULT rc = 0;
     bool isMultiple = (GetWindowStyle() & wxTR_MULTIPLE) != 0;
 
+#ifndef __SMARTPHONE__
     if (nMsg == WM_CONTEXTMENU)
     {
         wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_MENU, GetId() );
         event.m_item = GetSelection();
         event.SetEventObject( this );
         GetEventHandler()->ProcessEvent( event );
-        
+
         return rc;
     }
+#endif // __SMARTPHONE__
 
     if ( (nMsg >= WM_MOUSEFIRST) && (nMsg <= WM_MOUSELAST) )
     {
@@ -3067,5 +3091,14 @@ int wxTreeCtrl::GetState(const wxTreeItemId& node)
     return STATEIMAGEMASKTOINDEX(tvi.state);
 }
 
+#if WXWIN_COMPATIBILITY_2_2
+
+wxTreeItemId wxTreeCtrl::GetParent(const wxTreeItemId& item) const
+{
+    return GetItemParent( item );
+}
+
+#endif  // WXWIN_COMPATIBILITY_2_2
+
 #endif // wxUSE_TREECTRL