X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4cb88a72da82ab3488b6643f34755daf7c930043..1dde66dda68a3d712d2f4de0388c4bb3a3375b36:/src/msw/ole/dataobj.cpp diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 83a2761aa0..1f2df6cdb2 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -157,8 +157,7 @@ wxString wxDataFormat::GetId() const wxCHECK_MSG( !IsStandard(), s, wxT("name of predefined format cannot be retrieved") ); - int len = ::GetClipboardFormatName(m_format, s.GetWriteBuf(max), max); - s.UngetWriteBuf(); + int len = ::GetClipboardFormatName(m_format, wxStringBuffer(s, max), max); if ( !len ) { @@ -999,8 +998,7 @@ bool wxFileDataObject::SetData(size_t WXUNUSED(size), const void *pData) // +1 for terminating NUL len = ::DragQueryFile(hdrop, n, NULL, 0) + 1; - UINT len2 = ::DragQueryFile(hdrop, n, str.GetWriteBuf(len), len); - str.UngetWriteBuf(); + UINT len2 = ::DragQueryFile(hdrop, n, wxStringBuffer(str, len), len); m_filenames.Add(str); if ( len2 != len - 1 ) { @@ -1136,6 +1134,8 @@ protected: return TRUE; } #endif + + DECLARE_NO_COPY_CLASS(CFSTR_SHELLURLDataObject) }; @@ -1171,8 +1171,7 @@ wxString wxURLDataObject::GetURL() const size_t len = m_dataObjectLast->GetDataSize(); - m_dataObjectLast->GetDataHere(url.GetWriteBuf(len)); - url.UngetWriteBuf(); + m_dataObjectLast->GetDataHere(wxStringBuffer(url, len)); return url; }