#if wxUSE_PRINTING_ARCHITECTURE && (!defined(__WXUNIVERSAL__) || !wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW)
#ifndef WX_PRECOMP
+ #include "wx/msw/wrapcdlg.h"
#include "wx/app.h"
#include "wx/dcprint.h"
+ #include "wx/cmndata.h"
#endif
-#include "wx/cmndata.h"
#include "wx/printdlg.h"
#include "wx/msw/printdlg.h"
#include "wx/paper.h"
#include <stdlib.h>
-#include "wx/msw/wrapcdlg.h"
-
#ifndef __WIN32__
#include <print.h>
#endif
GlobalFree(hDevNames);
}
-bool wxWindowsPrintNativeData::Ok() const
+bool wxWindowsPrintNativeData::IsOk() const
{
return (m_devMode != NULL) ;
}
} else {
data.SetBin(wxPRINTBIN_DEFAULT);
}
-
+ if (devMode->dmFields & DM_MEDIATYPE)
+ {
+ wxASSERT(devMode->dmMediaType != wxPRINTMEDIA_DEFAULT);
+ data.SetMedia(devMode->dmMediaType);
+ }
//// Printer name
if (devMode->dmDeviceName[0] != 0)
// This syntax fixes a crash when using VS 7.1
devMode->dmFields |= DM_DEFAULTSOURCE;
}
-
+ if (data.GetMedia() != wxPRINTMEDIA_DEFAULT)
+ {
+ devMode->dmMediaType = data.GetMedia();
+ devMode->dmFields |= DM_MEDIATYPE;
+ }
GlobalUnlock(hDevMode);
}
return m_printerDC;
}
else
- return (wxDC*) NULL;
+ return (wxPrinterDC*) NULL;
}
bool wxWindowsPrintDialog::ConvertToNative( wxPrintDialogData &data )