X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/115de22f78ff3394ca39c04b01a684244e38b1b1..1722a3f626f7b29b42a22fc6329ce12fb5e8ed90:/src/os2/stattext.cpp diff --git a/src/os2/stattext.cpp b/src/os2/stattext.cpp index dc70b334f5..1ee58a4b8c 100644 --- a/src/os2/stattext.cpp +++ b/src/os2/stattext.cpp @@ -283,10 +283,6 @@ void wxStaticText::DoSetLabel(const wxString& str) wxString wxStaticText::DoGetLabel() const { - HWND hwnd = GetHwnd(); - LONG textLen = ::WinQueryWindowTextLength(hwnd); - wxCharBuffer buffer(textLen+1); - ::WinQueryWindowText(hwnd, textLen+1, buffer.data()); - return buffer; + return wxGetWindowText(GetHwnd()); }