Skip to content

Latest commit

 

History

History
117 lines (78 loc) · 3.66 KB

nf-wingdi-gettextfacea.md

File metadata and controls

117 lines (78 loc) · 3.66 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wingdi.GetTextFaceA
GetTextFaceA function (wingdi.h)
The GetTextFace function retrieves the typeface name of the font that is selected into the specified device context. (ANSI)
GetTextFaceA
wingdi/GetTextFaceA
gdi\gettextface.htm
gdi
c4c8c8f5-3651-481b-a55f-da7f49d92f3a
12/05/2018
GetTextFace, GetTextFace function [Windows GDI], GetTextFaceA, GetTextFaceW, _win32_GetTextFace, gdi.gettextface, wingdi/GetTextFace, wingdi/GetTextFaceA, wingdi/GetTextFaceW
wingdi.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
GetTextFaceW (Unicode) and GetTextFaceA (ANSI)
Gdi32.lib
Gdi32.dll
Windows
19H1
GetTextFaceA
wingdi/GetTextFaceA
c++
APIRef
kbSyntax
DllExport
gdi32.dll
Ext-MS-Win-GDI-Font-l1-1-0.dll
Ext-MS-Win-GDI-Font-l1-1-1.dll
ext-ms-win-gdi-font-l1-1-2.dll
Ext-MS-Win-GDI-Font-L1-1-3.dll
GDI32Full.dll
GetTextFace
GetTextFaceA
GetTextFaceW

GetTextFaceA function

-description

The GetTextFace function retrieves the typeface name of the font that is selected into the specified device context.

-parameters

-param hdc [in]

A handle to the device context.

-param c [in]

The length of the buffer pointed to by lpFaceName. For the ANSI function it is a BYTE count and for the Unicode function it is a WORD count. Note that for the ANSI function, characters in SBCS code pages take one byte each, while most characters in DBCS code pages take two bytes; for the Unicode function, most currently defined Unicode characters (those in the Basic Multilingual Plane (BMP)) are one WORD while Unicode surrogates are two WORDs.

-param lpName [out]

A pointer to the buffer that receives the typeface name. If this parameter is NULL, the function returns the number of characters in the name, including the terminating null character.

-returns

If the function succeeds, the return value is the number of characters copied to the buffer.

If the function fails, the return value is zero.

-remarks

The typeface name is copied as a null-terminated character string.

If the name is longer than the number of characters specified by the nCount parameter, the name is truncated.

Note

The wingdi.h header defines GetTextFace 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.

-see-also

Font and Text Functions

Fonts and Text Overview

GetTextAlign

GetTextColor

GetTextExtentPoint32

GetTextMetrics