From: Stefan Neis Date: Fri, 6 Apr 2007 20:42:29 +0000 (+0000) Subject: Tentative implementation of wxStaticText::DoGetLabel(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/115de22f78ff3394ca39c04b01a684244e38b1b1?ds=inline Tentative implementation of wxStaticText::DoGetLabel(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/os2/stattext.cpp b/src/os2/stattext.cpp index 3f6e73d522..dc70b334f5 100644 --- a/src/os2/stattext.cpp +++ b/src/os2/stattext.cpp @@ -283,7 +283,10 @@ void wxStaticText::DoSetLabel(const wxString& str) wxString wxStaticText::DoGetLabel() const { - // FIXME: how to retrieve the text? - //return wxGetWindowText(GetHWND()); + HWND hwnd = GetHwnd(); + LONG textLen = ::WinQueryWindowTextLength(hwnd); + wxCharBuffer buffer(textLen+1); + ::WinQueryWindowText(hwnd, textLen+1, buffer.data()); + return buffer; }