I have a 3rd party dll (plain C++) which draws on a HDC some lines. I want to have these lines on a C# Bitmap or Form.
I tried to give the C++ a HBITMAP or a HDC of the Graphics.FromImage(bitmap) but none of the above ways worked for me.
With a MFC TestApp everything works fine using the following code
HWND handle = pStatic->GetSafeHwnd();
CDC* dc = pStatic->GetDC();
Draw(dc);
My question is: What do I have to do/use to draw on a Bitmap or form with the above Draw(HDC) method?
I hope you can help me. Thanks in advance,
Patrick