]> git.saurik.com Git - wxWidgets.git/commitdiff
extracted check for wxListCtrl in WM_PRINT handler to wxListCtrl itself, base class...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Feb 2005 19:24:46 +0000 (19:24 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Feb 2005 19:24:46 +0000 (19:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/listctrl.h
src/msw/listctrl.cpp
src/msw/window.cpp

index 8f6278e592e0797bc4def57b8c70539f9651fddf..711e1f93c68ba83ac3fe6cfbb0cc58e0f76ad27d 100644 (file)
@@ -375,6 +375,11 @@ protected:
     // convert our styles to Windows
     virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
 
+    // special Windows message handling
+    virtual WXLRESULT MSWWindowProc(WXUINT nMsg,
+                                    WXWPARAM wParam,
+                                    WXLPARAM lParam);
+
 
     wxTextCtrl*       m_textCtrl;        // The control used for editing a label
     wxImageList *     m_imageListNormal; // The image list for normal icons
index 49c6d04c040586e1c6ad599d984520ad268da589..b3894f1461605ed4b76fcb91c782a553e6794b1f 100644 (file)
@@ -2385,6 +2385,21 @@ void wxListCtrl::OnPaint(wxPaintEvent& event)
     }
 }
 
+WXLRESULT
+wxListCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
+{
+#ifdef WM_PRINT
+    if ( nMsg == WM_PRINT )
+    {
+        // we should bypass our own WM_PRINT handling as we don't handle
+        // PRF_CHILDREN flag, so leave it to the native control itself
+        return MSWDefWindowProc(nMsg, wParam, lParam);
+    }
+#endif // WM_PRINT
+
+    return wxControl::MSWWindowProc(nMsg, wParam, lParam);
+}
+
 // ----------------------------------------------------------------------------
 // virtual list controls
 // ----------------------------------------------------------------------------
index e3beb318c540d313c2298a34a0fc05957f93b54a..105459f34c5790feb3734f3ff0e021c108c926ff 100644 (file)
@@ -2311,15 +2311,9 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
                 break;
             }
 
-#ifndef __WXWINCE__
+#ifdef WM_PRINT
         case WM_PRINT:
             {
-#if wxUSE_LISTCTRL
-                // Don't call the wx handlers in this case
-                if ( wxIsKindOf(this, wxListCtrl) )
-                    break;
-#endif
-
                 if ( lParam & PRF_ERASEBKGND )
                     HandleEraseBkgnd((WXHDC)(HDC)wParam);
 
@@ -2327,7 +2321,7 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
                 processed = HandlePaint();
             }
             break;
-#endif
+#endif // WM_PRINT
 
         case WM_CLOSE:
 #ifdef __WXUNIVERSAL__