HICON CreateIconIndirect(pici) | |||||
PICONINFO pici; | /* address of icon information structure | */ |
The CreateIconIndirect function creates an icon or cursor from an ICONINFO data structure.
pici
Points to an ICONINFO structure. The function will use the information in this structure to create the icon or cursor. The system copies the bitmaps in the ICONINFO structure before it creates the icon or cursor. The ICONINFO structure has the following format:
typedef struct _ICONINFO { /* ii */
BOOL fIcon;
DWORD xHotspot;
DWORD yHotspot;
HBITMAP hbmMask;
HBITMAP hbmColor;
} ICONINFO;
If the function is successful, the return value is a handle to the icon or cursor that is created.
If the function fails, the return value is NULL. More detailed information can be obtained by calling the GetLastError function.
Because the system makes copies of the bitmaps in pici, the application must continue to manage the original bitmaps. The bitmaps must be deleted when they are no longer needed.
CreateIcon, CreateIconFromResource, DestroyIcon, DrawIcon, GetIconInfo, LoadIcon, LookupIconIdFromDirectory,