X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/115de22f78ff3394ca39c04b01a684244e38b1b1..48271822ef3d56c8f91af882b68fd1b674a8e8e6:/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()); }