CDC::GetOutputTextExtent

This member function uses the output device context, m_hDC, and computes the width and height of a line of text, using the current font.

Syntax

CSize GetOutputTextExtent( LPCTSTR lpszString, int nCount ) const;

CSize GetOutputTextExtent( const CString& str ) const;

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

See Also

CDC Overview, CDC Member Functions, Graphical Drawing Classes, CDC::m_hAttribDC, CDC::m_hDC, CDC::GetTextExtent, CSize