[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
GetTextWidth( hWnd, cStr, hFont )-> <nFontWidth>
------------------------------------------------------------------------------
PARAMETER:
<hDC> Is the handle that identifies the windows device context. If
no hDC is given, GetTextWidth() will create one for the
active window, and release it after the operation.
<cStr> Is the string or char for that the pixel length is
requested
<hFont> Is the font that cStr uses. If <hFont> is not supplied,
GetTextWidth() will use the selected font.
RETURNS:
<nFontWidth> is the pixel width of the specified string, based on the
given font.
DESCRIPTION:
This function allows you to determine the exact length of a string using a
certain Font. This can be useful when you want to know if a string can be
completely written to a window without being 'clipped', or you want to
size a MDI Window to the MDI Parent.
SOURCE:
SOURCE\WINAPI\GETTEXTW.C
See Also:
GetTextHeight
nChrWidth
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson