IDWriteFactory ::CreateTextLayout, méthode (dwrite.h)

Prend une chaîne, un format texte et les contraintes associées, et produit un objet qui représente le résultat entièrement analysé et mis en forme.

Syntaxe

HRESULT CreateTextLayout(
  [in]  WCHAR const       *string,
        UINT32            stringLength,
        IDWriteTextFormat *textFormat,
        FLOAT             maxWidth,
        FLOAT             maxHeight,
  [out] IDWriteTextLayout **textLayout
);

Paramètres

[in] string

Type : const WCHAR*

Tableau de caractères qui contient la chaîne à partir de laquelle créer un objet IDWriteTextLayout . Ce tableau doit être de longueur stringLength et peut contenir des caractères NULL incorporés.

stringLength

Type : UINT32

Nombre de caractères dans la chaîne.

textFormat

Type : IDWriteTextFormat*

Pointeur vers un objet qui indique le format à appliquer à la chaîne.

maxWidth

Type : FLOAT

Largeur de la zone de disposition.

maxHeight

Type : FLOAT

Hauteur de la zone de disposition.

[out] textLayout

Type : IDWriteTextLayout**

Lorsque cette méthode est retournée, contient l’adresse d’un pointeur vers l’objet de disposition de texte résultant.

Valeur retournée

Type : HRESULT

Si cette méthode réussit, elle retourne S_OK. Sinon, elle retourne un code d’erreur HRESULT.

Spécifications

Condition requise Valeur
Client minimal pris en charge Windows 7, Windows Vista avec SP2 et Mise à jour de plateforme pour Windows Vista [applications de bureau | Applications UWP]
Serveur minimal pris en charge Windows Server 2008 R2, Windows Server 2008 avec SP2 et Platform Update pour Windows Server 2008 [applications de bureau | Applications UWP]
Plateforme cible Windows
En-tête dwrite.h
Bibliothèque Dwrite.lib
DLL Dwrite.dll

Voir aussi

IDWriteFactory