网站首页  词典首页

请输入您要查询的函数:

 

术语 printdlg
释义 PrintDlg
语法:
BOOL PrintDlg( LPPRINTDLG lppd
);
PrintDlg函数
显示一个打印对话框。在打印对话框,用户可以指定特定打印作业的属性。
视窗2000/XP的:PrintDlg函数已被PrintDlgEx函数取代。 PrintDlgEx displays a Print Property Sheet , which has a General page containing controls similar to the Print dialog box.
参数
lppd
[中,out]指向1 PRINTDLG结构,它包含用于初始化对话框的信息。当PrintDlg回报率,这种结构包含有关用户的选择信息。
返回值
如果用户点击确定按钮,返回值为非零值。该PRINTDLG结构的成员指出了lppd参数显示用户的选择。
如果用户取消或关闭打印或打印机设置对话框或发生错误,返回值是零。为了获得更多错误信息,请使用CommDlgExtendedError功能。如果用户取消或关闭该对话框,CommDlgExtendedError返回零,否则,它会返回下列值之一。
CDERR_FINDRESFAILURE
CDERR_INITIALIZATION
CDERR_LOADRESFAILURE
CDERR_LOADSTRFAILURE
CDERR_LOCKRESFAILURE
CDERR_MEMALLOCFAILURE
CDERR_MEMLOCKFAILURE
CDERR_NOHINSTANCE
CDERR_NOHOOK
CDERR_NOTEMPLATE
CDERR_STRUCTSIZE
PDERR_CREATEICFAILURE
PDERR_DEFAULTDIFFERENT
PDERR_DNDMMISMATCH
PDERR_GETDEVMODEFAIL
PDERR_INITFAILURE
PDERR_LOADDRVFAILURE
PDERR_NODEFAULTPRN
PDERR_NODEVICES
PDERR_PARSEFAILURE
PDERR_PRINTERNOTFOUND
PDERR_RETDEFFAILURE
备注
如果挂钩过程(指出的lpfnPrintHook或lpfnSetupHook的PRINTDLG结构的成员)进程WM_CTLCOLORDLG消息,挂钩过程必须返回一个句柄应该用于绘制控件的背景刷。
PrintDlg函数也可以显示一个打印设置对话框。然而,新的应用程序不应使用为此PrintDlg。的打印设置对话框已被取代的页面设置对话框中的函数创建PageSetupDlg方块。
请注意,hDevMode和PRINTDLG hDevNames的值可能会发生变化时,他们进入PrintDlg通过。这是因为这些成员对输入和输出填补。
在Windows 95/98/Me:PrintDlgW是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
已知问题在Windows XP / Vista中/视窗7:如果PD_RETURNDC设置,但PD_USEDEVMODECOPIESANDCOLLATE标志没有被设置,PrintDlgEx和PrintDlg函数返回不正确的副本数目。要得到正确的副本数量,确保调用应用程序始终使用PD_USEDEVMODECOPIESANDCOLLATE与PD_RETURNDC。
例如
有关示例,请参见显示打印对话框。
功能信息
最低DLL版本 comdlg32.dll
在Commdlg.h HeaderDeclared,头文件:winuser.h
import libraryComdlg32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
通用对话框库概况,CommDlgExtendedError,CreateDC,DOCINFO中,printDlg,PrintHookProc,SetupHookProc,StartDoc,WM_CTLCOLORDLG
==英文原文==PrintDlg Function
Displays a Print Dialog Box . The Print dialog box enables the user to specify the properties of a particular print job.
Windows 2000/XP: The PrintDlg function has been superseded by the PrintDlgEx function. PrintDlgEx displays a Print Property Sheet , which has a General page containing controls similar to the Print dialog box.
Syntax
BOOL PrintDlg( LPPRINTDLG lppd
);
Parameters
lppd
[in, out] 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.
Return Value
If the user clicks the OK button, the return value is nonzero. The members of the PRINTDLG structure pointed to by the lppd parameter indicate the user's selections.
If the user canceled or closed the Print or Printer Setup dialog box or an error occurred, the return value is zero. To get extended error information, use the CommDlgExtendedError function. If the user canceled or closed the dialog box, CommDlgExtendedError returns zero; otherwise, it returns one of the following values.
CDERR_FINDRESFAILURE
CDERR_INITIALIZATION
CDERR_LOADRESFAILURE
CDERR_LOADSTRFAILURE
CDERR_LOCKRESFAILURE
CDERR_MEMALLOCFAILURE
CDERR_MEMLOCKFAILURE
CDERR_NOHINSTANCE
CDERR_NOHOOK
CDERR_NOTEMPLATE
CDERR_STRUCTSIZE
PDERR_CREATEICFAILURE
PDERR_DEFAULTDIFFERENT
PDERR_DNDMMISMATCH
PDERR_GETDEVMODEFAIL
PDERR_INITFAILURE
PDERR_LOADDRVFAILURE
PDERR_NODEFAULTPRN
PDERR_NODEVICES
PDERR_PARSEFAILURE
PDERR_PRINTERNOTFOUND
PDERR_RETDEFFAILURE
Remarks
If the hook procedure (pointed to by the lpfnPrintHook or lpfnSetupHook member of the PRINTDLG structure) processes the WM_CTLCOLORDLG message, the hook procedure must return a handle to the brush that should be used to paint the control background.
The PrintDlg function can also display a Print Setup dialog box. However, new applications should not use PrintDlg for this purpose. The Print Setup dialog box has been superseded by the Page Setup dialog box created by the PageSetupDlg function.
Note that the values of hDevMode and hDevNames in PRINTDLG may change when they are passed into PrintDlg. This is because these members are filled on both input and output.
Windows 95/98/Me: PrintDlgW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Known issue on Windows XP/Vista/Windows 7: If PD_RETURNDC is set but PD_USEDEVMODECOPIESANDCOLLATE flag is not set, the PrintDlgEx and PrintDlg functions return incorrect number of copies. To get the correct number of copies, ensure that the calling application always uses PD_USEDEVMODECOPIESANDCOLLATE with PD_RETURNDC.
Example
For an example, see Displaying the Print Dialog Box .
Function Information
Minimum DLL Versioncomdlg32.dll
HeaderDeclared in Commdlg.h, include Windows.h
Import libraryComdlg32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.
See Also
Common Dialog Box Library Overview , CommDlgExtendedError , CreateDC , DOCINFO , PRINTDLG , PrintHookProc , SetupHookProc , StartDoc , WM_CTLCOLORDLG
==原始网址==http://msdn.microsoft.com/en-us/library/ms646940(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:18:49