]> git.saurik.com Git - wxWidgets.git/commitdiff
wxUniv compilation fix
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 19 Jun 2003 09:43:19 +0000 (09:43 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 19 Jun 2003 09:43:19 +0000 (09:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index e1d9ce5965f50b2bcb2c7947dd2fff002a34e48a..fa2afaca08e5aa21d07bd81e86b50fbf59777c0d 100644 (file)
@@ -3424,11 +3424,14 @@ bool wxWindowMSW::MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *itemStruct)
 
 #if wxUSE_CONTROLS
 
-    wxWindow *item = FindItem(id);
 #if wxUSE_OWNER_DRAWN
+    wxWindow *item = FindItem(id);
     if ( item && item->IsKindOf(CLASSINFO(wxControl)) )
         return ((wxControl *)item)->MSWOnDraw(itemStruct);
-#else
+#elif !defined(__WXUNIVERSAL__)
+    // we may still have owner-drawn buttons internally because we have to make
+    // them owner-drawn to support colour change
+    wxWindow *item = FindItem(id);
     if ( item && item->IsKindOf(CLASSINFO(wxButton)) )
         return ((wxButton *)item)->MSWOnDraw(itemStruct);
 #endif // USE_OWNER_DRAWN