#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;
#if wxUSE_UNICODE_MSLU
size_t sizeOfChar;
- if ( wxGetOsVersion() == wxWIN95 )
+ if ( wxGetOsVersion() == wxOS_WINDOWS_9X )
{
// Win9x always uses ANSI file names and MSLU doesn't help with this
sizeOfChar = sizeof(char);
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();
pDrop->pFiles = sizeof(DROPFILES);
pDrop->fNC = FALSE; // not non-client coords
#if wxUSE_UNICODE_MSLU
- pDrop->fWide = wxGetOsVersion() != wxWIN95 ? TRUE : FALSE;
+ pDrop->fWide = wxGetOsVersion() != wxOS_WINDOWS_9X ? TRUE : FALSE;
#else
pDrop->fWide = wxUSE_UNICODE;
#endif
#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);
}
// wxURLDataObject
// ----------------------------------------------------------------------------
+// Work around bug in Wine headers
+#if defined(__WINE__) && defined(CFSTR_SHELLURL) && wxUSE_UNICODE
+#undef CFSTR_SHELLURL
+#define CFSTR_SHELLURL _T("CFSTR_SHELLURL")
+#endif
+
class CFSTR_SHELLURLDataObject : public wxCustomDataObject
{
public: