pleese check in Windows 10 (or windows 8 ):
procedure TForm1.Button7Click(Sender: TObject);
var
fnt: TFontParams;
ModifyMask: TTextModifyMask;
AddFontStyle, RemoveFontStyle: TFontStyles;
begin
ModifyMask := [tmm_Color, tmm_Styles, tmm_Size, tmm_BackColor];
fnt.Size:=30;
fnt.Color:=clLime;
fnt.BkColor:=clRed;
AddFontStyle := [fsBold];
RemoveFontStyle := [];
RichMemo1.SetRangeParams(RichMemo1.SelStart, RichMemo1.SelLength,
ModifyMask, fnt, AddFontStyle, RemoveFontStyle);
end;
It works correctly in windows 7, but ... in Delphi I can't set background color in Windows 10 - some new in WinAPI. Now I haven't computer with Win10 to tests...