Quote:
Originally Posted by Drewpeu
If you have a problem let me know.
|
Lots of problems interoperating from GDI+ to GDI which explains the odd behaviour I have observed while experimenting.
INFO: Interoperability Between GDI and GDI+. The key paragraph is "Using GDI on a GDI+ Graphics Object Backed by a Bitmap"
A concise summary of a highly technical situation.
An hDC from a .NET Graphics for a Bitmap created by Graphics.FromImage(Bitmap) is effectively write-only as the underlying bitmap is not initialised. Therefore you can draw on it but not use it as a source.
An hDC from a .NET Graphics for a Control created by Control.CreatGraphics().GetHdc() is both readable and writeable as a physical bitmap exists on the screen.
Therefore BitBlt can be used for screen capture using the SRCCOPY rasterop to a destination bitmap and for very little else as the combinatorial rasterops do not have a destination to read. For this reason the the BitBlt way of achieving tranparency and animation won't work as it relies on the combinatorial rasterops SRCAND and SRCPAINT
GDI gurus may have a way round this but I am afraid that I don't know enough about GDI (and don't want to learn either) so I'll have to give up for now.