Fitting text into static control

I have not done much in MFC so I am asking this question. I have a static control in my dialog. I want the text to be resized if it goes beyond the text control i.e the text should be adjusted according to the control boundaries. can anyone please help me in this problem...
[274 byte] By [john_avi] at [2007-11-20 11:20:23]
# 1 Re: Fitting text into static control
You've got two ways to handle this.

1. Leave the text as is and use a tool tip when it extends past the bounds of the static control.

2. Use CDC::GetTextExtent () to compute the length of the line using the current font. If it exceeds the bounds of the control, modify the font.
Mike Harnad at 2007-11-10 22:25:53 >
# 2 Re: Fitting text into static control
thanks
john_avi at 2007-11-10 22:26:46 >