The AdvancedDocumentProperties function displays a printer-configuration dialog box for the specified printer, allowing the user to configure that printer.
LONG AdvancedDocumentProperties(
HWND hWnd, // handle to dialog box's parent window
HANDLE hPrinter, // handle to printer object
LPTSTR pDeviceName, // pointer to driver name
PDEVMODE pDevModeOutput,
// pointer to modified device mode structure
PDEVMODE pDevModeInput // pointer to original device mode
// structure
);
If the function succeeds, the return value is zero.
If the function fails, the return value is nonzero. To get extended error information, call GetLastError.
An application can obtain the printer handle identified by the hPrinter parameter by calling the OpenPrinter or AddPrinter function.
An application can obtain the name pointed to by the pDeviceName parameter by calling the GetPrinter function and then examining the pPrinterName member of the PRINTER_INFO_2 structure.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winspool.h.
Import Library: Use winspool.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Printing and Print Spooler Overview, Printing and Print Spooler Functions, AddPrinter, DEVMODE, GetPrinter, OpenPrinter, PRINTER_INFO_2