W
Will Pittenger
I have a program where I used Win32 calls to add items to my form's system
menu. Now I am attempting to have those items use the same icon that the
corresponding toolbar button uses. I thought that I could just access the
image on the fly and send it to Windows. Trouble is that results in an
image with dark blue where the image is transparent. (The menu's background
is the standard BTNFACE color.) My code is below. All need is a HBITMAP.
Windows is definitely insisting on a bitmap rather than an icon. Could
someone tell me what is wrong? Do I need to paint the image somewhere? I
would rather just copy it.
((System.Drawing.Bitmap)ilToolbarSmall.Images[iUncheckedIconIndex]).GetHbitm
ap()
menu. Now I am attempting to have those items use the same icon that the
corresponding toolbar button uses. I thought that I could just access the
image on the fly and send it to Windows. Trouble is that results in an
image with dark blue where the image is transparent. (The menu's background
is the standard BTNFACE color.) My code is below. All need is a HBITMAP.
Windows is definitely insisting on a bitmap rather than an icon. Could
someone tell me what is wrong? Do I need to paint the image somewhere? I
would rather just copy it.
((System.Drawing.Bitmap)ilToolbarSmall.Images[iUncheckedIconIndex]).GetHbitm
ap()