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