From c8e4fa8b2dcb1135ae39fadd151d70a48955bc74 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 1 Jun 2003 16:16:41 +0000 Subject: [PATCH] Applied patch [ 719667 ] Ownerdrawn Buttons without wxUSE_OWNER_DRAWN git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 555ac97b0b..21240160c3 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -3433,16 +3433,21 @@ bool wxWindowMSW::MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *itemStruct) } #endif // wxUSE_MENUS_NATIVE -#if wxUSE_CONTROLS - wxWindow *item = FindItem(id); - if ( item && item->IsKindOf(CLASSINFO(wxControl)) ) - { - return ((wxControl *)item)->MSWOnDraw(itemStruct); - } -#endif // wxUSE_CONTROLS - #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); +#else + if ( item && item->IsKindOf(CLASSINFO(wxButton)) ) + return ((wxButton *)item)->MSWOnDraw(itemStruct); +#endif // USE_OWNER_DRAWN + +#endif // wxUSE_CONTROLS + return FALSE; }