Win32 printing using metafile

Hi Folks,

I’ve been trying to use the “Printing an OpenGL Image” technique described in MSDN.

To summarize the process:

  1. Call StartDoc() with printer DC
  2. Call StartPage() with printer DC
  3. Call wglCreateContext with metafile DC

etc.

My question is: how do you get the metafile DC that’s associated with the printer DC? The article says nothing about how to do this.

Is there already a metafile DC, and I have to get it somehow? Or, am I supposed to create one and associate it with the printer DC?

I’ve been looking through MSDN, but I can’t figure it out.

Any help would be greatly appreciated.

Thanks,
Dan