Home > Back-end >  How to control the output font color
How to control the output font color

Time:09-25

In c + + how to make the run window words show different color

CodePudding user response:

Use richedit this control, allows you to set each character display color,
 int oldLen=redit - & gt; The Text. The Length (); 
Redit - & gt; Lines - & gt; Add (Sender - & gt; The ToString () + IntToStr (rand ()));
Int newLen=redit - & gt; The Text. The Length ();

Redit - & gt; SelStart=oldLen;
Redit - & gt; SelLength=newLen - oldLen;
Redit - & gt; SelAttributes - & gt; Color=(TColor) random (TColor: : clMax);

CodePudding user response:

The Label - & gt; The Font - & gt; Color

CodePudding user response:

Excuse me, can give you a complete code ", learn how to use, thanks
  • Related