Platform SDK: Active Directory, ADSI, and Directory Services

IDsDisplaySpecifier::GetIcon

The IDsDisplaySpecifier::GetIcon method loads the icon for a given object class.

HICON GetIcon(
  LPCWSTR pszObjectClass,
  DWORD dwFlags,
  INT cxIconr,
  INT cyIconr
);

Parameters

pszObjectClass
[in] Name of the object class with which the icon is associated.
dwFlags
[in] A flag indicating the type of icon to be fetched:
dwFlags Description
DSGIF_ISNORMAL Standard icon.
DSGIF_OPEN Open icon, for example, open folders.
DSGIF_DISABLED Disabled icon, for example, a disabled user account.
DSGIF_GETDEFAULTICON Default document icon from Shell32.

cxIconr
[in] Size of the image to load.
cyIconr
[in] Size of the image to load.

Return Values

The method returns a handle to the loaded icon if the operation is successful. Otherwise, it return a NULL handle.

Remarks

This method looks up the resource name from the display specifier and then loads the object from the file. The icon information is stored in the display specifier. Fifteen different icon states (open, closed, disabled, and so on) are supported. These icons are used for displaying the directory object.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Dsclient.h.
  Library: Included as a resource in Dsuiext.dll.

See Also

Active Directory Display Interfaces, IDsDisplaySpecifier