GregDuncan
01-06-2005, 03:36 AM
I am making a button control.
When the button is disabled I wanted to turn the icon grey.
I have been able to do this fine if the picture loaded is a bitmap.
When the picture is an icon however my converttogreyscale function that I found on the web doesnt work.
The reason it doesnt work is because when the icon is copyed into a bitmap structure it doesnt hold any of the necessary information such as width and height etc.
eg Dim BMI As BitmapInfo
Can anyone suggest another way to convert an icon to greyscale or perhaps point me in the right direction to convert my icon into a valid bitmap.
Thanks
ps as this is just a small button I didnt want to use gdi+
When the button is disabled I wanted to turn the icon grey.
I have been able to do this fine if the picture loaded is a bitmap.
When the picture is an icon however my converttogreyscale function that I found on the web doesnt work.
The reason it doesnt work is because when the icon is copyed into a bitmap structure it doesnt hold any of the necessary information such as width and height etc.
eg Dim BMI As BitmapInfo
Can anyone suggest another way to convert an icon to greyscale or perhaps point me in the right direction to convert my icon into a valid bitmap.
Thanks
ps as this is just a small button I didnt want to use gdi+