Draws an image from an image list with the theme-defined icon effect.
Syntax
HRESULT DrawThemeIcon( HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, HIMAGELIST himl, int iImageIndex );
Parameters
- hTheme
- Handle to a window's specified theme data. Use OpenThemeData to create an HTHEME.
- hdc
- Handle to a device context.
- iPartId
- Integer that specifies the part in which the image is drawn.
- iStateId
- Integer that specifies the state of the part.
- pRect
- Pointer to a RECT structure that contains, in logical coordinates, the rectangle in which the image is drawn.
- himl
- Handle to an image list that contains the image to draw.
- iImageIndex
- Integer that specifies the index in the image list of the image to draw.
Return Value
Returns S_OK if successful, or an error value otherwise.
Function Information
Stock Implementation UxTheme.dll Custom Implementation No Header ThemeApi.h Import library UxTheme.lib Minimum operating systems Windows NT Whistler