-// This form is deprecated
-wxPrinterDC::wxPrinterDC( const wxString& rsDriverName,
- const wxString& rsDeviceName,
- const wxString& rsFile,
- bool bInteractive,
- int nOrientation )
-{
- DEVOPENSTRUC vDevOpen = { (char*)rsDeviceName.c_str()
- ,(char*)rsDriverName.c_str()
- ,NULL
- ,NULL
- ,NULL
- ,NULL
- ,NULL
- ,NULL
- ,NULL
- };
-
- m_isInteractive = bInteractive;
-
- if (!rsFile.IsNull() && !rsFile.empty())
- m_printData.SetFilename(rsFile);
-
-/*
- Implement PM's version of this
-#if wxUSE_COMMON_DIALOGS
- if (interactive)
- {
- PRINTDLG pd;
-
- pd.lStructSize = sizeof( PRINTDLG );
- pd.hwndOwner=(HWND) NULL;
- pd.hDevMode=(HANDLE)NULL;
- pd.hDevNames=(HANDLE)NULL;
- pd.Flags=PD_RETURNDC | PD_NOSELECTION | PD_NOPAGENUMS;
- pd.nFromPage=0;
- pd.nToPage=0;
- pd.nMinPage=0;
- pd.nMaxPage=0;
- pd.nCopies=1;
- pd.hInstance=(HINSTANCE)NULL;
-
- if ( PrintDlg( &pd ) != 0 )
- {
- m_hDC = (WXHDC) pd.hDC;
- m_ok = true;
- }
- else
- {
- m_ok = false;
- return;
- }
- }
- else
-#endif
-*/
- if ( !rsDriverName.empty() &&
- !rsDeviceName.empty() &&
- !rsFile.empty() )
- {
- m_hDC = (WXHDC) ::DevOpenDC( vHabmain
- ,OD_QUEUED
- ,"*"
- ,5L
- ,(PDEVOPENDATA)&vDevOpen
- ,NULLHANDLE
- );
- m_ok = m_hDC ? true: false;
- }
- else
- {
- wxPrintData vPrintData;
-
- vPrintData.SetOrientation(nOrientation);
- m_hDC = wxGetPrinterDC(vPrintData);
- m_ok = m_hDC ? true: false;
- }
-
- if (m_hDC)
- {
- // int width = GetDeviceCaps(m_hDC, VERTRES);
- // int height = GetDeviceCaps(m_hDC, HORZRES);
- SetMapMode(wxMM_TEXT);
- }
- SetBrush(*wxBLACK_BRUSH);
- SetPen(*wxBLACK_PEN);
-} // end of wxPrinterDC::wxPrinterDC
-
-wxPrinterDC::wxPrinterDC( const wxPrintData& rPrintData )