PolyTextOutA function (wingdi.h)
The PolyTextOut function draws several strings using the font and text colors currently selected in the specified device context.
Syntax
BOOL PolyTextOutA(
[in] HDC hdc,
[in] const POLYTEXTA *ppt,
[in] int nstrings
);
Parameters
[in] hdc
A handle to the device context.
[in] ppt
A pointer to an array of POLYTEXT structures describing the strings to be drawn. The array contains one structure for each string to be drawn.
[in] nstrings
The number of POLYTEXT structures in the pptxt array.
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks
Each POLYTEXT structure contains the coordinates of a reference point that Windows uses to align the corresponding string of text. An application can specify how the reference point is used by calling the SetTextAlign function. An application can determine the current text-alignment setting for the specified device context by calling the GetTextAlign function.
To draw a single string of text, the application should call the ExtTextOut function.
PolyTextOut will not handle international scripting support automatically. To get international scripting support, use ExtTextOut instead. ExtTextOut will use Uniscribe when necessary resulting in font fallback. Additionally, ExtTextOut will perform internal batching of calls before transitioning to kernel mode, mitigating some of the performance concerns when weighing usage of PolyTextOut versus ExtTextOut.
Tip
ExtTextOut is strongly recommended over PolyTextOut for modern development due to its ability to handle display of different languages.
Note
The wingdi.h header defines PolyTextOut as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | wingdi.h (include Windows.h) |
Library | Gdi32.lib |
DLL | Gdi32.dll |