lcdial
Nov 22nd, 2000, 09:18 AM
I'm using the API Print dialog and it works great, except for one thing: I don't know how to tell if the user has pressed Cancel or not. Here's some code:
'API Printer Dialog
Dim tPrintDlg As PrintDlg
tPrintDlg.lStructSize = Len(tPrintDlg)
tPrintDlg.hwndOwner = Me.hWnd
tPrintDlg.hdc = hdc
tPrintDlg.flags = 0
tPrintDlg.nFromPage = 0
tPrintDlg.nToPage = 0
tPrintDlg.nMinPage = 0
tPrintDlg.nMaxPage = 0
tPrintDlg.nCopies = 1
tPrintDlg.hInstance = App.hInstance
lpPrintTemplateName = "Print Page"
Dim a
a = PrintDlg(tPrintDlg)
'Printing Code
The Declarations are all correct and the dialog pops up, but when the user presses cancel, it does not set an error like the OCX and I can't find which flags it changes! HELP ME....please?
Thanks!
'API Printer Dialog
Dim tPrintDlg As PrintDlg
tPrintDlg.lStructSize = Len(tPrintDlg)
tPrintDlg.hwndOwner = Me.hWnd
tPrintDlg.hdc = hdc
tPrintDlg.flags = 0
tPrintDlg.nFromPage = 0
tPrintDlg.nToPage = 0
tPrintDlg.nMinPage = 0
tPrintDlg.nMaxPage = 0
tPrintDlg.nCopies = 1
tPrintDlg.hInstance = App.hInstance
lpPrintTemplateName = "Print Page"
Dim a
a = PrintDlg(tPrintDlg)
'Printing Code
The Declarations are all correct and the dialog pops up, but when the user presses cancel, it does not set an error like the OCX and I can't find which flags it changes! HELP ME....please?
Thanks!