]> git.saurik.com Git - wxWidgets.git/commitdiff
cleaned code a bit
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 27 May 1998 23:41:55 +0000 (23:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 27 May 1998 23:41:55 +0000 (23:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/ole/droptgt.cpp

index 7ff89237d5fb242c9104d42a22f3a9922735151f..31615f3bb051f6a6352673dc0d3de9f4ab6ebf32 100644 (file)
@@ -123,44 +123,6 @@ END_IID_TABLE;
 
 IMPLEMENT_IUNKNOWN_METHODS(wxIDropTarget)
 
-#if 0
-  STDMETHODIMP wxIDropTarget::QueryInterface(REFIID riid, void **ppv)
-  {                                                                           
-//    wxLogQueryInterface(wxIDropTarget, riid);                                    
-                                                                              
-    if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) {                  
-      *ppv = this;
-      AddRef();                                                               
-                                                                              
-      return S_OK;                                                            
-    }                                                                         
-    else {                                                                    
-      *ppv = NULL;                                                            
-                                                                              
-      return (HRESULT) E_NOINTERFACE;
-    }                                                                         
-  }                                                                           
-                                                                              
-  STDMETHODIMP_(ULONG) wxIDropTarget::AddRef()                                    
-  {                                                                           
-    wxLogAddRef(wxIDropTarget, m_cRef);                                          
-                                                                              
-    return ++m_cRef;                                                          
-  }                                                                           
-                                                                              
-  STDMETHODIMP_(ULONG) wxIDropTarget::Release()                                   
-  {                                                                           
-    wxLogRelease(wxIDropTarget, m_cRef);                                         
-                                                                              
-    if ( --m_cRef == 0 ) {                                                    
-      delete this;                                                            
-      return 0;                                                               
-    }                                                                         
-    else                                                                      
-      return m_cRef;                                                          
-  }
-#endif
-
 // Name    : wxIDropTarget::DragEnter
 // Purpose : Called when the mouse enters the window (dragging something)
 // Returns : S_OK
@@ -320,7 +282,7 @@ bool wxDropTarget::Register(WXHWND hwnd)
 {
   HRESULT hr = ::CoLockObjectExternal(m_pIDropTarget, TRUE, FALSE);
   if ( FAILED(hr) ) {
-    // wxLogApiError("CoLockObjectExternal", hr);
+    wxLogApiError("CoLockObjectExternal", hr);
     return FALSE;
   }
 
@@ -328,7 +290,7 @@ bool wxDropTarget::Register(WXHWND hwnd)
   if ( FAILED(hr) ) {
     ::CoLockObjectExternal(m_pIDropTarget, FALSE, FALSE);
 
-    // wxLogApiError("RegisterDragDrop", hr);
+    wxLogApiError("RegisterDragDrop", hr);
     return FALSE;
   }
 
@@ -339,9 +301,8 @@ void wxDropTarget::Revoke(WXHWND hwnd)
 {
   HRESULT hr = ::RevokeDragDrop((HWND) hwnd);
 
-  if ( FAILED(hr) )
-  {
-    // wxLogApiError("RevokeDragDrop", hr);
+  if ( FAILED(hr) ) {
+    wxLogApiError("RevokeDragDrop", hr);
   }
 
   ::CoLockObjectExternal(m_pIDropTarget, FALSE, TRUE);