]> git.saurik.com Git - wxWidgets.git/commitdiff
corrected wxLogErrors() in Clear() and Flush()
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 11 Mar 2005 00:02:27 +0000 (00:02 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 11 Mar 2005 00:02:27 +0000 (00:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/clipbrd.cpp

index cd848901bdef147aa096158f0ca33868c97ae08b..96813f8f587904c1ce6f2b1414c21a59baad6809 100644 (file)
@@ -549,19 +549,21 @@ wxClipboard::~wxClipboard()
 void wxClipboard::Clear()
 {
 #if wxUSE_OLE_CLIPBOARD
-    if ( FAILED(OleSetClipboard(NULL)) )
+    HRESULT hr = OleSetClipboard(NULL);
+    if ( FAILED(hr) )
     {
-        wxLogLastError(wxT("OleSetClipboard(NULL)"));
+        wxLogApiError(wxT("OleSetClipboard(NULL)"), hr);
     }
-#endif
+#endif // wxUSE_OLE_CLIPBOARD
 }
 
 bool wxClipboard::Flush()
 {
 #if wxUSE_OLE_CLIPBOARD
-    if ( FAILED(OleFlushClipboard()) )
+    HRESULT hr = OleFlushClipboard();
+    if ( FAILED(hr) )
     {
-        wxLogLastError(wxT("OleFlushClipboard"));
+        wxLogApiError(wxT("OleFlushClipboard"), hr);
 
         return false;
     }