win32ui CreatePrintDialog

Chris Lambacher lambacck at computer.org
Fri Jul 15 18:08:35 EDT 2005


Hi,

This question has come up a few times on the list with no one giving a public
answer.  How do you use CreatePrintDialog from win32ui?

About a year ago someone posted that:
dlg = win32ui.CreatePrintDialog(1538)
dlg.DoModal()

will give you the window, but the ok button does not work.

Diging into the source shows that the 1538 is being loaded as a template
resource.  The MSDN documentation does not say anything about this being
neccessary and in fact, other common dialogs provide this as an option, but
not a requirement.  Why is this made a requirement?  If it was not made a
requirement, would the dialog work?

Unfortunately I can't play with this because I don't have Visual Studio.  I
guess the logical next step, if the above worked, would be to add the
GetPrinterDC() method (and maybe some others) so that we can do something
useful with the dialog.

Thanks,
Chris



More information about the Python-list mailing list