Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Creates an icon or cursor from an ICONINFO structure.
HICON CreateIconIndirect(
[in] PICONINFO piconinfo
);
[in] piconinfo
Type: PICONINFO
A pointer to an ICONINFO structure the function uses to create the icon or cursor.
Type: HICON
If the function succeeds, the return value is a handle to the icon or cursor that is created.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
The system copies the bitmaps in the ICONINFO structure before creating the icon or cursor. Because the system may temporarily select the bitmaps in a device context, the hbmMask and hbmColor members of the ICONINFO structure 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 you are finished using the icon, destroy it using the DestroyIcon function.
For an example, see Creating a Cursor.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winuser.h (include Windows.h) |
Library | User32.lib |
DLL | User32.dll |
API set | ext-ms-win-ntuser-gui-l1-3-0 (introduced in Windows 10, version 10.0.10240) |
Conceptual
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!