IonicWind Software

IWBasic => General Questions => Topic started by: Brian on November 16, 2010, 05:29:09 AM

Title: Printer Setup Dialog
Post by: Brian on November 16, 2010, 05:29:09 AM
Hi,

I notice in the EBA File menu, you can select Print and also Print Setup

How do we do the Print Setup dialog in our own EB programs?

Cheers,

Brian

Title: Re: Printer Setup Dialog
Post by: ZeroDog on November 16, 2010, 06:16:46 PM
Use the PrintDlg API function in the comdlg32.dll

QuoteDECLARE "comdlg32.dll" Alias "PrintDlgA",PrintDlg(lppd:PRINTDLG),INT

lppd - Pointer to a PRINTDLG structure that contains information used to initialize the dialog box. When PrintDlg returns, this structure contains information about the userââ,¬â,,¢s selections.

QuoteTYPE PRINTDLG
   DEF lStructSize:INT
   DEF hwndOwner:INT
   DEF hDevMode:INT
   DEF hDevNames:INT
   DEF hdc:INT
   DEF flags:INT
   DEF nFromPage:WORD
   DEF nToPage:WORD
   DEF nMinPage:WORD
   DEF nMaxPage:WORD
   DEF nCopies:WORD
   DEF hInstance:INT
   DEF lCustData:INT
   DEF lpfnPrintHook:INT
   DEF lpfnSetupHook:INT
   DEF lpPrintTemplateName:STRING
   DEF lpSetupTemplateName:STRING
   DEF hPrintTemplate:INT
   DEF hSetupTemplate:INT
ENDTYPE
Title: Re: Printer Setup Dialog
Post by: Brian on November 17, 2010, 05:23:20 AM
Thanks for the info - I figured it was something like that, but nice
to see a bit of code to get me going

Brian
Title: Re: Printer Setup Dialog
Post by: talun on November 18, 2010, 12:32:40 AM
Brian,
maybe the E\Iwbasic PRTDIALOG function can work for you

bye

Sergio