]> git.saurik.com Git - wxWidgets.git/commitdiff
Tentative implementation of wxStaticText::DoGetLabel().
authorStefan Neis <Stefan.Neis@t-online.de>
Fri, 6 Apr 2007 20:42:29 +0000 (20:42 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Fri, 6 Apr 2007 20:42:29 +0000 (20:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/os2/stattext.cpp

index 3f6e73d52285dd2f5245c19ed97f3bb7239d7f79..dc70b334f5b93ccec791be236c27d01f2db15b87 100644 (file)
@@ -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;
 }