From 115de22f78ff3394ca39c04b01a684244e38b1b1 Mon Sep 17 00:00:00 2001
From: Stefan Neis <Stefan.Neis@t-online.de>
Date: Fri, 6 Apr 2007 20:42:29 +0000
Subject: [PATCH] Tentative implementation of wxStaticText::DoGetLabel().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/os2/stattext.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

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;
 }