Hello Devadutta,
when the focus is on the RichTextBox control hold down the control key and use the scroll button on your mouse. This way you'll be able to zoom in and out, making the text bigger or smaller as you wish.
Oh no: I've been reading too superficially again. Solution below is
for WinForm and not MFC as requested. (Shame on me)
Start of modification
If you'd like to do it code wise:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void trackBar1_Scroll(object sender, EventArgs e)
{
float factor = (float)trackBar1.Value / 10;
richTextBox1.ZoomFactor = factor;
}
}
The form contains a TrackBar and a RichTextBox control. The TrackBar has a Maximum of 40 and a Minimum of 1. Via the calculation in the Scroll event handler the zoom factor is effectively set to anything from one thenth (0.1) up to 4.0. Of course you can choose your own values as you please ;) .
End of Modification
Greetings
Manfred