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.
AddPrinter, DEVMODE, GetPrinter, OpenPrinter, PRINTER_INFO_2