I have a library that draw on to given HDC using GDI+ apis. I want to use that in a WPF application. I did try getting the handle from WindowInteropHelper class and passing it to the library method which does the drawing. However it fails simply because it cannot create Gdi+ Graphics from that handle.
I then tried using a WinForm element in WindowsFormsHost control and using the HDC available in WinForm control's paint event and it did work fine. What I want to know is can the same thing be made to work directly on WPF control\window? Is there some other way to get the HDC from WPF elements on which GDI draw apis can be used?