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
This commit is contained in:
Vadim Zeitlin 2014-12-25 01:31:54 +00:00
parent 5d982d4438
commit 73a38319d8

View File

@ -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() )