// wxWindowsPrintNativeData
//----------------------------------------------------------------------------
-#ifdef __WXDEBUG__
static wxString wxGetPrintDlgError()
{
DWORD err = CommDlgExtendedError();
}
return msg;
}
-#endif // __WXDEBUG__
static HGLOBAL
wxCreateDevNames(const wxString& driverName,
pd.hDevMode = NULL;
pd.hDevNames = NULL;
-#ifdef __WXDEBUG__
- wxString str(wxT("Printing error: "));
- str += wxGetPrintDlgError();
- wxLogDebug(str);
-#endif // __WXDEBUG__
+ wxLogDebug(wxT("Printing error: ") + wxGetPrintDlgError());
}
else
{
{
// NB: the cast is needed in the ANSI build, strangely enough
// dmDeviceName is BYTE[] and not char[] there
- wxStrncpy(reinterpret_cast<wxChar *>(devMode->dmDeviceName),
+ wxStrlcpy(reinterpret_cast<wxChar *>(devMode->dmDeviceName),
name.wx_str(),
- WXSIZEOF(devMode->dmDeviceName) - 1);
- devMode->dmDeviceName[WXSIZEOF(devMode->dmDeviceName) - 1] = wxT('\0');
+ WXSIZEOF(devMode->dmDeviceName));
}
//// Colour