I am trying to use an HIMAGELIST from an unmanaged dll which gives me the result as an IntPtr.
Is there a way for me to turn this IntPtr into a Bitmap or an Image so I can use it for Winforms buttons, as in:
myButton.Image = intPtrImage
I am trying to use an HIMAGELIST from an unmanaged dll which gives me the result as an IntPtr.
Is there a way for me to turn this IntPtr into a Bitmap or an Image so I can use it for Winforms buttons, as in:
myButton.Image = intPtrImage
You need to call ImageList_GetIcon
for each image in the list - this will give you an HICON which is easy to load into a Bitmap