Export (0) Print
Expand All
Expand Minimize

DrawThemeIcon function

Draws an image from an image list with the icon effect defined by the visual style.

Syntax


HRESULT DrawThemeIcon(
  _In_ HTHEME     hTheme,
  _In_ HDC        hdc,
  _In_ int        iPartId,
  _In_ int        iStateId,
  _In_ LPCRECT    pRect,
  _In_ HIMAGELIST himl,
  _In_ int        iImageIndex
);

Parameters

hTheme [in]

Type: HTHEME

Handle to a window's specified theme data. Use OpenThemeData to create an HTHEME.

hdc [in]

Type: HDC

HDC.

iPartId [in]

Type: int

Value of type int that specifies the part in which the image is drawn. See Parts and States.

iStateId [in]

Type: int

Value of type int that specifies the state of the part. See Parts and States.

pRect [in]

Type: LPCRECT

Pointer to a RECT structure that contains, in logical coordinates, the rectangle in which the image is drawn.

himl [in]

Type: HIMAGELIST

Handle to an image list that contains the image to draw.

iImageIndex [in]

Type: int

Value of type int that specifies the index of the image to draw.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Uxtheme.h

Library

UxTheme.lib

DLL

UxTheme.dll

See also

Reference
Property Identifiers
IImageList

 

 

Community Additions

ADD
Show:
© 2015 Microsoft