SetupDiDrawMiniIcon

INT
SetupDiDrawMiniIcon(
IN HDC hdc,
IN RECT rc,
IN INT MiniIconIndex,
IN DWORD Flags
);

SetupDiDrawMiniIcon draws the specified mini-icon at the location requested.

Parameters

hdc

Supplies the handle of the device context in which the mini-icon will be drawn.

rc

The rectangle in the specified device context handle to draw the mini-icon in.

MiniIconIndex

The index of the mini-icon, as retrieved from SetupDiLoadClassIcon or SetupDiGetClassBitmapIndex. The following predefined indexes for devices can be used:

Class Index
Computer 0
Display 2
Mouse 5
Keyboard 6
FDC 9
HDC 9
Ports 10
Net 15
System 0
Sound 8
Printer 14
Monitor 2
Network Transport 3
Network Client 16
Network Service 17
Unknown 18

Flags

These flags control the drawing operation. The LOWORD contains the actual flags defined as follows:

DMI_MASK

Draw the mini-icon's mask into HDC.

DMI_BKCOLOR

Use the system color index specified in the HIWORD of Flags as the background color. If this flag is not set, COLOR_WINDOW is used.

DMI_USERECT

If set, SetupDiDrawMiniIcon uses the supplied rectangle and stretches the icon to fit.

Return Value

This function returns the offset from the left side of rc where the string should start.

Comments

By default, the icon is centered vertically and butted against the left side of the specified rectangle.

See Also

SetupDiGetClassBitmapIndex, SetupDiLoadClassIcon