Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

number of print copies....

rswy
Beginner
682 Views
Hi,
I have a piece of code that prints the contents of a portion of the screen using the printdlg function.However I am not able to change some properties of the print operation such as number of copies.Do I need to use a PrintHookProc?If so what should I write under WM_COMMAND under loword(lparam)=IDOK/IDCANCEL?
I am using the StretchBlt function with the first parameter as pd%hdc where pd is my variable of type printdlg.
Should I change this for modifying my print output(landscape/portrait etc.)?
Thanks.
--rswy
0 Kudos
3 Replies
james1
Beginner
682 Views
Are you setting the appropriate "Flags" in the PringDlg argument?

James
0 Kudos
rswy
Beginner
682 Views
Hi,
The following are the flags I am setting for
the printdlg structure:
pd%lStructSize= sizeof(pd)
pd%hwndOwner= ghwndmain
pd%Flags=PD_RETURNDC
pd%lpfnPrintHook =null
Should I set them differently?
When I tried using the printhookproc I set the following:

pd%lStructSize= sizeof(pd)
pd%hwndOwner= ghwndmain
pd%Flags=ior(PD_RETURNDC,PD_ENABLEPRINTHOOK)
pd%lpfnPrintHook =loc(PrintHookProc)

Please let me know if there's something wrong.
-rswy
0 Kudos
james1
Beginner
682 Views
I think if the print driver does multiple copies you will always see a "1" for number of copies. You can see what the user sets by setting a flag like PD_COLLATE (which of course may or may not be desirable depending on what you are doing).

James
0 Kudos
Reply