Hi there!
In my Notepad program, to determine char widths I use the following code.
This doesn't seem to be very effective. As sometimes I actually get it less than the actual width of the character (its the average, so its natural).Code:pDC->GetTextMetrics (&textmetrics); Size = pDC->GetTextExtent(pDoc->m_text); HideCaret(); pDoc->m_CarPos.x = Size.cx - textmetrics.tmAveCharWidth; pDoc->m_text.Empty();
Is there some other method to get the width of the last character in a CString, other than GetTextMetrics();
Thanks.