Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21107

Enumerate And Load Specific Icon From Multires Icon File Or Resource

$
0
0
Hello,
If you load any VB6 compiled executable with no custom icons or icon resources in an icon or resource manager, you'll see 3 icons:
- 16x16 16 Colors
- 32x32 16 Colors
- 32x32 2 Colors

Back to VB (/C++/WinAPI), I've been looking into every possible icon/image/resource API there is and, for the life of me, I couldn't find a way to extract or load the 32x32 2 colors icon into an hIcon Long. This is just an example of the general problem that is loading a specific resolution+colordepth icon from a multires icon file or resource (or enumerating the existing ones for that matter).
The best option right now is using LoadImage to load a specific resolution, which if non existing will yield a stretched icon, and if existing in different color depths, will only load the first one.

Any ideas? Needing help!
Thanks in advance.

Viewing all articles
Browse latest Browse all 21107

Trending Articles