Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

DrawShadowText function (commctrl.h)

Draws text that has a shadow.

Syntax

int DrawShadowText(
 HDC hdc,
 LPCWSTR pszText,
 UINT cch,
 RECT *prc,
 DWORD dwFlags,
 COLORREF crText,
 COLORREF crShadow,
 int ixOffset,
 int iyOffset
);

Parameters

hdc

Type: HDC

HDC.

pszText

Type: LPCWSTR

A pointer to a string that contains the text to be drawn.

cch

Type: UINT

A UINT that specifies the number of characters in the string that is to be drawn.

prc

Type: const RECT*

A pointer to a RECT structure that contains, in logical coordinates, the rectangle in which the text is to be drawn.

dwFlags

Type: DWORD

A DWORD that specifies how the text is to be drawn. See Format Values for possible parameter values.

crText

Type: COLORREF

A COLORREF structure that contains the color of the text.

crShadow

Type: COLORREF

A COLORREF structure that contains the color of the text shadow.

ixOffset

Type: int

A value of type int that specifies the x-coordinate of where the text should begin.

iyOffset

Type: int

A value of type int that specifies the y-coordinate of where the text should begin.

Return value

Type: int

Returns the height of the text in logical units if the function succeeds, otherwise returns zero.

Remarks

To use DrawShadowText, specify Comctl32.dll version 6 in the manifest. For more information on manifests, see Enabling Visual Styles.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h
Library Comctl32.lib
DLL ComCtl32.dll (version 6 or later)

Feedback

Was this page helpful?

Additional resources