How to use function `CreateIconIndirect` with 32 bit bitmaps?

László Szerémi 35 Reputation points
2024-11-03T20:53:08.11+00:00

Most icon related documentation is still written with the assumption that the user will want to create a black and white icon, even though we are in the year 2024.

A 32 bit bitmap has both the color information and the transparency mask in the same chunk, and I cannot find information on what to do in case of 32 bit bitmaps. Do I need to separate the alpha channel from the rest of the pixel data? And do I need to convert that transparency mask to 24 bits alongside with the image data?

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,484 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,649 questions
{count} votes

Accepted answer
  1. Castorix31 85,711 Reputation points
    2024-11-04T01:52:27.5666667+00:00
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.