I have some legacy MFC apps, and I’d like to use the Cairo drawing engine to add some charts and graphs.
I’m searching for a small example of how to get that to work. Basically, once I’ve created a PNG or GIF file, how do I get that show up in an MFC CView window?
My google-fu is not finding any good clues.
From my demo samples,
Assuming that you already have a surface you can use something like the above sample.
destis theHDChandle to the window you want to render the cairo surface.Update: CView::OnDraw()
You should implement the OnDraw() method for your CView (inherited?) class.
You can use the pDC pointer to draw the cairo surface, ie: