GDIPLUS: how we get HDC from Graphics?

using the GdipCreateFromHDC(), we create the Graphics from that HDC...
but i think the best it's create another HDC, right?
but how can i get the HDC from that Graphics?
unless i don't have the correct function declaration(i use it on VB6) or is something wrong...
i'm trying use it, but without success.. the pixels colors that i receive are black or white :(
but with that link, i will test it more... thank you so much for all
Last edited on
what is the GDIPLUS flat function for Graphics that do the 'FromImage()'?
GDIPLUS flat functions:
From :

The functions in the GDI+ flat API are wrapped by a collection of about 40 C++ classes. It is recommended that you do not directly call the functions in the flat API. Whenever you make calls to GDI+, you should do so by calling the methods and functions provided by the C++ wrappers.

Obviously it's gonna be a bit wonky trying to call C++ methods and functions in Visual Basic. That is what VB.NET is for.

As an alternative to the C++ wrappers, the Microsoft .NET Framework provides a set of managed-code wrapper classes for GDI+.

VB is slow compared to C/C++ Win32, GDI+ is sloooooooow compared to GDI and DirectX.

Slow + slow = something slower and less responsive than a snail covered in whale snot.

A couple of years ago I tried to 'update' some 2D GDI games to use GDI+. The games kept freezing for a second or two every 30 seconds or so as they tried to process simple frame-based BitBlts converted to GDI+, something that never happened with GDI, The games were using Win32 C based UI and C++ classes to handle the game engine.
Furry Guy: using GDIPLUS, we can read very image files... and with GDI we can't ;)
the GDIPLUS can be slow, but we can use DIB's with it and that it's more advantage ;)
thank you so much for all
If you are really concerned about quality image manipulation you really should be using the Windows Imaging Component. The WIC native codecs can decode and encode quite a number of popular image formats.
Topic archived. No new replies allowed.