-#if 0
-// This uses defaults, except for orientation, so we should eliminate this function
-// and use the 2nd form (passing wxPrintData) instead.
-WXHDC wxGetPrinterDC(int orientation)
-{
- HDC hDC;
- LPDEVMODE lpDevMode = NULL;
- LPDEVNAMES lpDevNames;
- LPSTR lpszDriverName;
- LPSTR lpszDeviceName;
- LPSTR lpszPortName;
-
- PRINTDLG pd;
- // __GNUWIN32__ has trouble believing PRINTDLG is 66 bytes - thinks it is 68
-#ifdef __GNUWIN32__
- pd.lStructSize = 66; // sizeof(PRINTDLG);
-#else
- pd.lStructSize = sizeof(PRINTDLG);
-#endif
- pd.hwndOwner = (HWND)NULL;
- pd.hDevMode = NULL; // Will be created by PrintDlg
- pd.hDevNames = NULL; // Ditto
- pd.Flags = PD_RETURNDEFAULT;
- pd.nCopies = 1;
-
- if (!PrintDlg((LPPRINTDLG)&pd))
- {
- if ( pd.hDevMode )
- GlobalFree(pd.hDevMode);
- if (pd.hDevNames)
- GlobalFree(pd.hDevNames);
-
- return(0);
- }
-
- if (!pd.hDevNames)
- {
- if ( pd.hDevMode )
- GlobalFree(pd.hDevMode);
- }
-
- lpDevNames = (LPDEVNAMES)GlobalLock(pd.hDevNames);
- lpszDriverName = (LPSTR)lpDevNames + lpDevNames->wDriverOffset;
- lpszDeviceName = (LPSTR)lpDevNames + lpDevNames->wDeviceOffset;
- lpszPortName = (LPSTR)lpDevNames + lpDevNames->wOutputOffset;
- GlobalUnlock(pd.hDevNames);
-
- if ( pd.hDevMode )
- {
- lpDevMode = (DEVMODE*) GlobalLock(pd.hDevMode);
- lpDevMode->dmOrientation = orientation;
- lpDevMode->dmFields |= DM_ORIENTATION;
- }
-
-#ifdef __WIN32__
- hDC = CreateDC(lpszDriverName, lpszDeviceName, lpszPortName, (DEVMODE *)lpDevMode);
-#else
- hDC = CreateDC(lpszDriverName, lpszDeviceName, lpszPortName, (LPSTR)lpDevMode);
-#endif
-
- if (pd.hDevMode && lpDevMode)
- GlobalUnlock(pd.hDevMode);
-
- if (pd.hDevNames)
- {
- GlobalFree(pd.hDevNames);
- pd.hDevNames=NULL;
- }
- if (pd.hDevMode)
- {
- GlobalFree(pd.hDevMode);
- pd.hDevMode=NULL;
- }
- return (WXHDC) hDC;
-}
-#endif
-