Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function creates an icon or cursor from an ICONINFOstructure.
HICON CreateIconIndirect( PICONINFO piconinfo );
Parameters
Return Values
A handle to the icon or cursor that is created indicates success. NULL indicates failure. To get extended error information, call GetLastError.
Remarks
The system copies the bitmaps in the ICONINFOstructure before creating the icon. Because the system may temporarily select the bitmaps in a device context, the hbmMaskand hbmColormembers of the ICONINFOstructure should not already be selected into a device context. The application must continue to manage the original bitmaps and delete them when they are no longer necessary.
When using Iconcurs.dll, call the CreateIconIndirectfunction to create either icons or monochrome cursors. Windows CE does not support color cursors.
Hotspots should be created with positive location values. If a hotspot is created with negative location values, there is no way to determine where it appears.
When you are finished using the icon, destroy it using the DestroyIconfunction.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winuser.h | Icon.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
DestroyIcon, DrawIcon, ICONINFO, LoadIcon