Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CDC::GetTextExtent
◄CDC►                                         ◄Up► ◄Contents► ◄Index► ◄Back►
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  CSize GetTextExtent( const char FAR* lpString, int nCount ) const;
 
  Parameter   Description
 
  <lpString>  Points to a string of characters. You can also pass a
              ◄CString► object for this parameter.
 
  <nCount>    Specifies the number of characters in the string.
 
  Remarks
 
  Computes the width and height of a line of text, using the current font
  to determine the dimensions.
 
  Since some devices do not place characters in regular cell arrays (that
  is, they carry out kerning), the sum of the extents of the characters in
  a string may not be equal to the extent of the string.
 
  Return Value
 
  The dimensions of the string (in logical units).
 
  See Also
 
  ◄CDC::GetTabbedTextExtent►, ◄::GetTextExtent►,
  ◄CDC::SetTextJustification►
 
 
                                     -♦-