I am using a button which is not DPI aware. I am using it everywhere in my code so ideally I'd like to add a few lines in the SetIcon of that button.
The SetIcon method (unsurprisingly) takes a HICON as a parameter - and I want to change the icon depending on the DPI resolution (so most of the time increase its size).
edit As pointed below, my question was not clear. I do not want to change the size of the icon - as read from a resource - but I want to transform a HICON od 16x16 into a new HICON of 40x40. I have got some code which reads a PNG (which returns a HICON) and LoadImage (nor LoadIconWithScaleDown) won't work with it.
Any ideas?
DrawIconEx()
into that memory DC to scale the icon. 3.CreateIcon()
from the bits of the memory DC to turn that back into an icon. – zett42