CDC::GetOutputTextExtent
Visual Studio 2012
Call this member function to use the output device context, m_hDC, and compute the width and height of a line of text, using the current font.
CSize GetOutputTextExtent( LPCTSTR lpszString, int nCount ) const; CSize GetOutputTextExtent( const CString& str ) const;
The dimensions of the string (in logical units) returned in a CSize object.