CDC::GetOutputTextExtent

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

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

CSize GetOutputTextExtent( LPCTSTR lpszString, int nCount ) const;

CSize GetOutputTextExtent( const CString& str ) const;

See Also

CDC::m_hAttribDC, CDC::m_hDC, CDC::GetTextExtent, CSize