Microsoft DirectX 8.0 (C++) |
Creates a mesh containing the specified ANSI text using the font associated with the device context.
HRESULT D3DXCreateTextA( LPDIRECT3DDEVICE8 pDevice, HDC hDC, LPCSTR pText, FLOAT Deviation, FLOAT Extrusion, LPD3DXMESH* ppMesh, LPGLYPHMETRICSFLOAT pGlyphMetrics );
If you are not concerned with the glyph sizes, you can pass NULL to pGlyphMetrics.
If the function succeeds, the return value is D3D_OK.
If the function fails, the return value can be one of the following values.
D3DERR_INVALIDCALL |
D3DXERR_INVALIDDATA |
E_OUTOFMEMORY |
D3DXCreateText maps to either D3DXCreateTextA or D3DXCreateTextW, depending on the inclusion or exclusion of the #define UNICODE switch. Include or exclude the #define UNICODE switch to specify whether your application expects Unicode or ANSI strings. The following code fragment shows how D3DXCreateText is defined.
#ifdef UNICODE #define D3DXCreateText D3DXCreateTextW #else #define D3DXCreateText D3DXCreateTextA #endif
For more information on the GLYPHMETRICSFLOAT structure, see the Microsoft® Platform Software Development Kit (SDK).
Header: Declared in D3dx8shape.h.
Import Library: Use D3dx8.lib.