Well, after searching through Gtk code last night, with help from Mental, it LOOKS like Win32 API's PrintDlgExW() is returning ok, but that printdlgex->hDC is not being set. Thus the null argument to cairo_win32_surface_create(). I may be wrong, but that's what it looks like. I suspected that maybe MinGW's PRINTDLGEXW struct definition might not match that of the native Win2003 SDK, but it looks OK, too. Adrian, you're right, a call that doesn't require an HDC would be great. :)
Anyway, we're strategically no closer to fixing the bug, but have made tactical advances. But it looks like the problem is definitely upstream in Gtk territory or MinGW or something like that. Maybe it's not the source, but just a particular build?
Well, after searching through Gtk code last night, with help from Mental, it LOOKS like Win32 API's PrintDlgExW() is returning ok, but that printdlgex->hDC is not being set. Thus the null argument to cairo_win32_ surface_ create( ). I may be wrong, but that's what it looks like. I suspected that maybe MinGW's PRINTDLGEXW struct definition might not match that of the native Win2003 SDK, but it looks OK, too. Adrian, you're right, a call that doesn't require an HDC would be great. :)
Here is the gtk source: svn.gnome. org/viewvc/ gtk%2B/ trunk/gtk/ gtkprintoperati on-win32. c?annotate= 18860
http://
Look at lines 1544 and 1603.
Anyway, we're strategically no closer to fixing the bug, but have made tactical advances. But it looks like the problem is definitely upstream in Gtk territory or MinGW or something like that. Maybe it's not the source, but just a particular build?