I'm using a third party library for drawing graphs. The library requires a HDC (GDI). But my application is using GDI+.
Q1: Is it safe to do this?
void f(Gdiplus::Graphics& graphics)
{
HDC dc = graphics.GetHDC();
// Call 3rd party lib functions using dc
// ...
graphics.ReleaseHDC(dc);
}
Q2: Some of the lib's functions require a bounding RECT struct (WinAPI). How do I calculate the coordinates for that rectangle if I'm using millimeters as page unit?
graphics.SetPageUnit(UnitMillimeter);