// The pointer to my edit control.
extern CEdit* pmyEdit;
// The index of the char to get information on.
extern int nIndex;CString strText;pmyEdit->GetWindowText(strText);
strText = strText.Mid(nIndex, 1);// Get the text extent of the character.
CDC* pDC = pmyEdit->GetDC();
CSize sz = pDC->GetTextExtent(strText);
pmyEdit->ReleaseDC(pDC);CPoint pt = pmyEdit->PosFromChar(nIndex);// Dump the index, character, line number, and character bounds.
TRACE("nIndex = %d, character = %c, line = %d, bounds = {%d, %d, %d, %d}\r\n",
   nIndex, strText[0], pmyEdit->LineFromChar(nIndex),
   pt.x /* left */, pt.y /* top */,
   pt.x+sz.cx /* right */, pt.y+sz.cy /* bottom */);