Applied patch [ 1583316 ] set media source for printing

by d2walter


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-10-29 17:29:40 +00:00
parent 03db59bd43
commit 781609f290
3 changed files with 16 additions and 2 deletions

View File

@@ -198,7 +198,11 @@ bool wxWindowsPrintNativeData::TransferTo( wxPrintData &data )
} 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
@@ -547,7 +551,11 @@ bool wxWindowsPrintNativeData::TransferFrom( const wxPrintData &data )
devMode->dmFields |= DM_DEFAULTSOURCE;
}
if (data.GetMedia() != wxPRINTMEDIA_DEFAULT)
{
devMode->dmMediaType = data.GetMedia();
devMode->dmFields |= DM_MEDIATYPE;
}
GlobalUnlock(hDevMode);
}