You don't use the returned DEVMODE
As MSDN says :" The resulting DEVMODE that is returned to the caller is suitable for other API calls that use DEVMODE buffers such a CreateDC(), SetPrinter(), PrintDlg(), or ResetDC().
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I would like to print on two-sided (duplex),
the complete code is here, can you reproduce it ?
but my HP printer prints one sided.
I allocated the correct size of buffer.
like refer to the Doc:Modify printer settings with the DocumentProperties() Function
Thanks
You don't use the returned DEVMODE
As MSDN says :" The resulting DEVMODE that is returned to the caller is suitable for other API calls that use DEVMODE buffers such a CreateDC(), SetPrinter(), PrintDlg(), or ResetDC().
DocumentProperties(NULL
hPrinter,
pDevice,
pDevMode, /* Reuse our buffer for output. */
pDevMode, /* Pass the driver our changes. */
DM_IN_BUFFER | /* Commands to Merge our changes and */
DM_OUT_BUFFER); /* write the result. */
Le DEVMODE is passed to DocumentProperties() which is stored in the spool file.
but it's ignored by « Hp Smart Universal Printing » driver...