Hi all,
I wrote an Icon class to easily handle 32bit icons in VB6. I used following project as example: Systray Icon
The problem, which I am facing is, that in my class one icon cannot be loaded - but in the example it is! And I dont see a difference between both projects... :(
Here you can download my Demo Class.
The icon which is not loaded is the second icon in the resource file (ICON_0). But both projects are using the same resource file.
The LoadImage function is used for resource file icons in the compiled project only. So you should compile it to see the problem.
I added the LoadImage call twice: the first call uses the W-variant of the API, the second the A-variant, like it is done in the example.
Both calls fail in my demo for the second icon. But the first icon (INT resource) is loaded correctly - and in the example this second icon is loaded too.
No dll error occurs - the returned handle is just zero.
Can you reproduce this behavoir?
Do you see the problem source?
Here you can see the loaded icon in the example:
Attachment 94773
And here the missing one in my demo:
Attachment 94775
While writing the class, I found two other APIs: LoadIcon and LoadIconMetric. Can somebody tell me the differences/advantages/disadvantages of these two compared to LoadImage?
I wrote an Icon class to easily handle 32bit icons in VB6. I used following project as example: Systray Icon
The problem, which I am facing is, that in my class one icon cannot be loaded - but in the example it is! And I dont see a difference between both projects... :(
Here you can download my Demo Class.
The icon which is not loaded is the second icon in the resource file (ICON_0). But both projects are using the same resource file.
The LoadImage function is used for resource file icons in the compiled project only. So you should compile it to see the problem.
I added the LoadImage call twice: the first call uses the W-variant of the API, the second the A-variant, like it is done in the example.
Both calls fail in my demo for the second icon. But the first icon (INT resource) is loaded correctly - and in the example this second icon is loaded too.
No dll error occurs - the returned handle is just zero.
Can you reproduce this behavoir?
Do you see the problem source?
Here you can see the loaded icon in the example:
Attachment 94773
And here the missing one in my demo:
Attachment 94775
While writing the class, I found two other APIs: LoadIcon and LoadIconMetric. Can somebody tell me the differences/advantages/disadvantages of these two compared to LoadImage?