+ data.SetCollate( false );
+ }
+
+ //// Number of copies
+ if (devMode->dmFields & DM_COPIES)
+ data.SetNoCopies( devMode->dmCopies );
+
+ //// Bin
+ if (devMode->dmFields & DM_DEFAULTSOURCE) {
+ switch (devMode->dmDefaultSource) {
+ case DMBIN_ONLYONE : data.SetBin(wxPRINTBIN_ONLYONE ); break;
+ case DMBIN_LOWER : data.SetBin(wxPRINTBIN_LOWER ); break;
+ case DMBIN_MIDDLE : data.SetBin(wxPRINTBIN_MIDDLE ); break;
+ case DMBIN_MANUAL : data.SetBin(wxPRINTBIN_MANUAL ); break;
+ case DMBIN_ENVELOPE : data.SetBin(wxPRINTBIN_ENVELOPE ); break;
+ case DMBIN_ENVMANUAL : data.SetBin(wxPRINTBIN_ENVMANUAL ); break;
+ case DMBIN_AUTO : data.SetBin(wxPRINTBIN_AUTO ); break;
+ case DMBIN_TRACTOR : data.SetBin(wxPRINTBIN_TRACTOR ); break;
+ case DMBIN_SMALLFMT : data.SetBin(wxPRINTBIN_SMALLFMT ); break;
+ case DMBIN_LARGEFMT : data.SetBin(wxPRINTBIN_LARGEFMT ); break;
+ case DMBIN_LARGECAPACITY : data.SetBin(wxPRINTBIN_LARGECAPACITY ); break;
+ case DMBIN_CASSETTE : data.SetBin(wxPRINTBIN_CASSETTE ); break;
+ case DMBIN_FORMSOURCE : data.SetBin(wxPRINTBIN_FORMSOURCE ); break;
+ default:
+ if (devMode->dmDefaultSource >= DMBIN_USER)
+ data.SetBin((wxPrintBin)((devMode->dmDefaultSource)-DMBIN_USER+(int)wxPRINTBIN_USER));
+ else
+ data.SetBin(wxPRINTBIN_DEFAULT);
+ }
+ } else {
+ data.SetBin(wxPRINTBIN_DEFAULT);
+ }
+ if (devMode->dmFields & DM_MEDIATYPE)
+ {
+ wxASSERT( (int)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
+ data.SetPrinterName( wxString(devMode->dmDeviceName, CCHDEVICENAME) );
+
+ //// Colour
+ if (devMode->dmFields & DM_COLOR)
+ {
+ if (devMode->dmColor == DMCOLOR_COLOR)