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

LoadImage API Not Behaving As Expected When Loading System Icons

$
0
0
Hello,
The LoadImage API according to documentation and several tests I have performed has the following behavior when loading icons from files or resources (assuming square resolutions only):

If the requested icon size is not available in the designated icon, LoadImage tries to load the next larger one, or if not available, the first smaller one. LoadImage then stretches the loaded icon to the requested width and height (cx and cy parameters). This can be easily tested with the DrawIcon or DrawIconEx APIs.

Now when loading a system icon with all the right flags set, LoadImage always loads a 32x32 size. I don't know where these icons are located, but assuming they are single resolution icons of 32 pixels, LoadImage should stretch them up or down as requested, but alas, no luck.

Here's the call I'm using:

Code:

hIcon = LoadImage(ByVal 0&, Clng(32513), 1&, 64, 64, &H8000&)

Any ideas on why is that or how to fix it?
Thanks in advance.

Viewing all articles
Browse latest Browse all 21278

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>