]> git.saurik.com Git - wxWidgets.git/commitdiff
build fix for wxUSE_DRAGIMAGE==0
authorPaul Cornett <paulcor@bullseye.com>
Sat, 5 May 2007 18:48:56 +0000 (18:48 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Sat, 5 May 2007 18:48:56 +0000 (18:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/treectrl.h
src/msw/treectrl.cpp

index 905c330c7f2ee9b1b73d661d729afd8c4a4400a8..4e7f7ca231f85c4a4e0db996551d616b7c9ec6b8 100644 (file)
@@ -263,8 +263,10 @@ private:
     // true if the hash above is not empty
     bool m_hasAnyAttr;
 
+#if wxUSE_DRAGIMAGE
     // used for dragging
     wxDragImage *m_dragImage;
+#endif
 
     // Virtual root item, if wxTR_HIDE_ROOT is set.
     void* m_pVirtualRoot;
index d7df087c94a483f628266287fdbbc683f5aeb7eb..8b3b1a2f57b4c8dd5336c6ca18b720a6eceed2ac 100644 (file)
@@ -618,7 +618,9 @@ void wxTreeCtrl::Init()
 {
     m_textCtrl = NULL;
     m_hasAnyAttr = false;
+#if wxUSE_DRAGIMAGE
     m_dragImage = NULL;
+#endif
     m_pVirtualRoot = NULL;
 
     // initialize the global array of events now as it can't be done statically
@@ -2136,6 +2138,7 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
                 }
 #endif // __WXWINCE__
 
+#if wxUSE_DRAGIMAGE
                 if ( m_dragImage )
                 {
                     m_dragImage->Move(wxPoint(x, y));
@@ -2148,6 +2151,7 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
                         m_dragImage->Show();
                     }
                 }
+#endif // wxUSE_DRAGIMAGE
                 break;
 
             case WM_LBUTTONUP:
@@ -2173,6 +2177,7 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
                 // fall through
 
             case WM_RBUTTONUP:
+#if wxUSE_DRAGIMAGE
                 if ( m_dragImage )
                 {
                     m_dragImage->EndDrag();
@@ -2189,6 +2194,7 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
                     // are selected simultaneously which is quite weird
                     TreeView_SelectDropTarget(GetHwnd(), 0);
                 }
+#endif // wxUSE_DRAGIMAGE
                 break;
         }
     }
@@ -2717,6 +2723,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
 
         case TVN_BEGINDRAG:
         case TVN_BEGINRDRAG:
+#if wxUSE_DRAGIMAGE
             if ( event.IsAllowed() )
             {
                 // normally this is impossible because the m_dragImage is
@@ -2727,6 +2734,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                 m_dragImage->BeginDrag(wxPoint(0,0), this);
                 m_dragImage->Show();
             }
+#endif // wxUSE_DRAGIMAGE
             break;
 
         case TVN_DELETEITEM: