]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 719667 ] Ownerdrawn Buttons without wxUSE_OWNER_DRAWN
authorJulian Smart <julian@anthemion.co.uk>
Sun, 1 Jun 2003 16:16:41 +0000 (16:16 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 1 Jun 2003 16:16:41 +0000 (16:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index 555ac97b0be00f373798b01e7033149b05ccfaf9..21240160c31a15342554dcfef8c3f26c1de578a3 100644 (file)
@@ -3433,16 +3433,21 @@ bool wxWindowMSW::MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *itemStruct)
     }
 #endif // wxUSE_MENUS_NATIVE
 
+#endif // USE_OWNER_DRAWN
+
 #if wxUSE_CONTROLS
+
     wxWindow *item = FindItem(id);
+#if wxUSE_OWNER_DRAWN
     if ( item && item->IsKindOf(CLASSINFO(wxControl)) )
-    {
         return ((wxControl *)item)->MSWOnDraw(itemStruct);
-    }
-#endif // wxUSE_CONTROLS
-
+#else
+    if ( item && item->IsKindOf(CLASSINFO(wxButton)) )
+        return ((wxButton *)item)->MSWOnDraw(itemStruct);
 #endif // USE_OWNER_DRAWN
 
+#endif // wxUSE_CONTROLS
+
     return FALSE;
 }