From 73a38319d8d95f921055c947aa79fa75efc4034c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 25 Dec 2014 01:31:54 +0000 Subject: [PATCH] Add support for strikeout fonts to wxMSW wxTextCtrl. Map them to CFE_STRIKEOUT in the native rich text control. See #16591. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/textctrl.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 263ff1a0b3..de6f1db7ec 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -2669,7 +2669,7 @@ bool wxTextCtrl::MSWSetCharFormat(const wxTextAttr& style, long start, long end) // but using it doesn't seem to hurt neither so leaving it for now cf.dwMask |= CFM_FACE | CFM_SIZE | CFM_CHARSET | - CFM_ITALIC | CFM_BOLD | CFM_UNDERLINE; + CFM_ITALIC | CFM_BOLD | CFM_UNDERLINE | CFM_STRIKEOUT; // fill in data from LOGFONT but recalculate lfHeight because we need // the real height in twips and not the negative number which @@ -2702,8 +2702,10 @@ bool wxTextCtrl::MSWSetCharFormat(const wxTextAttr& style, long start, long end) { cf.dwEffects |= CFE_UNDERLINE; } - - // strikeout fonts are not supported by wxWidgets + if ( lf.lfStrikeOut ) + { + cf.dwEffects |= CFE_STRIKEOUT; + } } if ( style.HasTextColour() )