#include "wx/intl.h"
#include "wx/log.h"
#include "wx/utils.h"
+ #include "wx/wxcrtvararg.h"
#endif
#include "wx/dataobj.h"
// wxDataFormat
// ----------------------------------------------------------------------------
-void wxDataFormat::SetId(const wxChar *format)
+void wxDataFormat::SetId(const wxString& format)
{
- m_format = (wxDataFormat::NativeFormat)::RegisterClipboardFormat(format);
+ m_format = (wxDataFormat::NativeFormat)::RegisterClipboardFormat(format.wx_str());
if ( !m_format )
{
wxLogError(_("Couldn't register clipboard format '%s'."), format);
if ( !len )
{
wxLogError(_("The clipboard format '%d' doesn't exist."), m_format);
+ return wxEmptyString;
}
return s;
size_t len;
#if wxUSE_UNICODE_MSLU
if ( sizeOfChar == sizeof(char) )
- len = strlen(wxConvFileName->cWC2MB(m_filenames[i]));
+ len = strlen(m_filenames[i].mb_str(*wxConvFileName));
else
#endif // wxUSE_UNICODE_MSLU
len = m_filenames[i].length();
#if wxUSE_UNICODE_MSLU
if ( sizeOfChar == sizeof(char) )
{
- wxCharBuffer buf(wxConvFileName->cWC2MB(m_filenames[i]));
+ wxCharBuffer buf(m_filenames[i].mb_str(*wxConvFileName));
len = strlen(buf);
memcpy(pbuf, buf, len*sizeOfChar);
}