// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// From MSDN: How To Modify Printer Settings with the DocumentProperties() Function
// The purpose of this is to fill the DEVMODE with privdata from printer driver.
// From MSDN: How To Modify Printer Settings with the DocumentProperties() Function
// The purpose of this is to fill the DEVMODE with privdata from printer driver.
// this replaces the PrintDlg function which creates the DEVMODE filled only with data from default printer.
if ( !m_devMode && !printerName.IsEmpty() )
{
// this replaces the PrintDlg function which creates the DEVMODE filled only with data from default printer.
if ( !m_devMode && !printerName.IsEmpty() )
{
// NB: the cast is needed in the ANSI build, strangely enough
// dmDeviceName is BYTE[] and not char[] there
wxStrlcpy(reinterpret_cast<wxChar *>(devMode->dmDeviceName),
// NB: the cast is needed in the ANSI build, strangely enough
// dmDeviceName is BYTE[] and not char[] there
wxStrlcpy(reinterpret_cast<wxChar *>(devMode->dmDeviceName),