Hi folks,
I am about creating an ownerdrawn button where I want to
display a bitmap from file. The button finally will have different sizes
when it is place on a form so I'll have to stretch the bitmap.
I could do this with StretchBlt but the quality isn't that good.
I've tried to use GDI+ for stretching the bitmap but I am not
so familiar with GDI+. I was able to display the streched bitmap on
the button but the speed of GDI+ isn't fast enough if you have lots of
button placed on the form (that's my expierience so far).
Therefore I would like to use only the stretch function of GDI+
within the WM_CREATE message of the button control (it's a dll and
we talk about SDK style). GdipDrawImageRectI stretches the bitmap
into the right size but onto a memory device context, created by
GdipCreatefromHDC which isn't compatible to the ordinary memory
device context (I assume...).
The questions is how to get the stretched bitmap back from this memory DC
to BitBlt it onto the final device context?
Another question is if the use of GDI+ in several usercontrols (dll) on a form
is doable or not?
Thank you for your help
I am about creating an ownerdrawn button where I want to
display a bitmap from file. The button finally will have different sizes
when it is place on a form so I'll have to stretch the bitmap.
I could do this with StretchBlt but the quality isn't that good.
I've tried to use GDI+ for stretching the bitmap but I am not
so familiar with GDI+. I was able to display the streched bitmap on
the button but the speed of GDI+ isn't fast enough if you have lots of
button placed on the form (that's my expierience so far).
Therefore I would like to use only the stretch function of GDI+
within the WM_CREATE message of the button control (it's a dll and
we talk about SDK style). GdipDrawImageRectI stretches the bitmap
into the right size but onto a memory device context, created by
GdipCreatefromHDC which isn't compatible to the ordinary memory
device context (I assume...).
The questions is how to get the stretched bitmap back from this memory DC
to BitBlt it onto the final device context?
Another question is if the use of GDI+ in several usercontrols (dll) on a form
is doable or not?
Thank you for your help
Comment