From: Julian Smart Date: Sun, 1 Jun 2003 16:16:41 +0000 (+0000) Subject: Applied patch [ 719667 ] Ownerdrawn Buttons without wxUSE_OWNER_DRAWN X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c8e4fa8b2dcb1135ae39fadd151d70a48955bc74?ds=inline 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 --- 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 +#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; }