]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listbox.cpp
Moved print dialog data conversion code
[wxWidgets.git] / src / msw / listbox.cpp
index 1fc6d08142d39e81e4752ae2159ffa2ad8c348ea..84e7896bdf2715c3788a4c2f4809c2144f42e207 100644 (file)
@@ -513,9 +513,7 @@ wxString wxListBox::GetString(int N) const
 
     // +1 for terminating NUL
     wxString result;
-    wxChar* buffer = result.GetWriteBuf(len + 1);
-    ListBox_GetText(GetHwnd(), N, buffer);
-    result.UngetWriteBuf();
+    ListBox_GetText(GetHwnd(), N, wxStringBuffer(result, len + 1));
 
     return result;
 }