// This form is deprecated
wxPrinterDC::wxPrinterDC(const wxString& driver_name, const wxString& device_name, const wxString& file, bool interactive, int orientation)
{
m_isInteractive = interactive;
// This form is deprecated
wxPrinterDC::wxPrinterDC(const wxString& driver_name, const wxString& device_name, const wxString& file, bool interactive, int orientation)
{
m_isInteractive = interactive;
pd.lStructSize = sizeof( PRINTDLG );
pd.hwndOwner=(HWND) NULL;
pd.hDevMode=(HANDLE)NULL;
pd.lStructSize = sizeof( PRINTDLG );
pd.hwndOwner=(HWND) NULL;
pd.hDevMode=(HANDLE)NULL;
- if ((!driver_name.IsNull() && driver_name != "") &&
- (!device_name.IsNull() && device_name != "") &&
- (!file.IsNull() && file != ""))
+ if ((!driver_name.IsNull() && driver_name != wxT("")) &&
+ (!device_name.IsNull() && device_name != wxT("")) &&
+ (!file.IsNull() && file != wxT("")))
- m_hDC = (WXHDC) CreateDC((char *) (const char *) driver_name, (char *) (const char *) device_name, (char *) (const char *) file, NULL);
+ m_hDC = (WXHDC) CreateDC(WXSTRINGCAST driver_name, WXSTRINGCAST device_name, WXSTRINGCAST file, NULL);
if (pd.hDevNames)
{
lpDevNames = (LPDEVNAMES)GlobalLock(pd.hDevNames);
lpszDriverName = (LPSTR)lpDevNames + lpDevNames->wDriverOffset;
lpszDeviceName = (LPSTR)lpDevNames + lpDevNames->wDeviceOffset;
lpszPortName = (LPSTR)lpDevNames + lpDevNames->wOutputOffset;
if (pd.hDevNames)
{
lpDevNames = (LPDEVNAMES)GlobalLock(pd.hDevNames);
lpszDriverName = (LPSTR)lpDevNames + lpDevNames->wDriverOffset;
lpszDeviceName = (LPSTR)lpDevNames + lpDevNames->wDeviceOffset;
lpszPortName = (LPSTR)lpDevNames + lpDevNames->wOutputOffset;
lpDevNames = (LPDEVNAMES)GlobalLock(pd.hDevNames);
lpszDriverName = (LPSTR)lpDevNames + lpDevNames->wDriverOffset;
lpszDeviceName = (LPSTR)lpDevNames + lpDevNames->wDeviceOffset;
lpszPortName = (LPSTR)lpDevNames + lpDevNames->wOutputOffset;
GlobalUnlock(pd.hDevNames);
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;
}
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
#ifdef __WIN32__
hDC = CreateDC(lpszDriverName, lpszDeviceName, lpszPortName, (DEVMODE *)lpDevMode);
#else
hDC = CreateDC(lpszDriverName, lpszDeviceName, lpszPortName, (LPSTR)lpDevMode);
#endif
- char* deviceName;
- char* portName = (char*) NULL; // Obsolete in WIN32
-
- if (devNameStr == "")
- deviceName = (char*) NULL;
+ wxChar* deviceName;
+ wxChar* portName = (wxChar*) NULL; // Obsolete in WIN32
+
+ if (devNameStr == wxT(""))
+ deviceName = (wxChar*) NULL;
#ifdef __WIN32__
HDC hDC = CreateDC(driverName, deviceName, portName, (DEVMODE *) lpDevMode);
#else
HDC hDC = CreateDC(driverName, deviceName, portName, (LPSTR) lpDevMode);
#endif
#ifdef __WIN32__
HDC hDC = CreateDC(driverName, deviceName, portName, (DEVMODE *) lpDevMode);
#else
HDC hDC = CreateDC(driverName, deviceName, portName, (LPSTR) lpDevMode);
#endif