https://git.reactos.org/?p=reactos.git;a=commitdiff;h=406c31cee8dbac75fa7ac…
commit 406c31cee8dbac75fa7ac7708e512efc44d48d18
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Wed Dec 6 19:24:20 2017 +0200
[ATL] CWindow: Add an overload of GetDlgItemText which takes a CSimpleString as
parameter
---
sdk/lib/atl/atlwin.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sdk/lib/atl/atlwin.h b/sdk/lib/atl/atlwin.h
index fa5301ff63..b21087012f 100644
--- a/sdk/lib/atl/atlwin.h
+++ b/sdk/lib/atl/atlwin.h
@@ -575,6 +575,17 @@ public:
return ::GetDlgItemText(m_hWnd, nID, lpStr, nMaxCount);
}
+#ifdef __ATLSTR_H__
+ UINT GetDlgItemText(int nID, CSimpleString& string)
+ {
+ HWND item = GetDlgItem(nID);
+ int len = ::GetWindowTextLength(item);
+ len = GetDlgItemText(nID, string.GetBuffer(len+1), len+1);
+ string.ReleaseBuffer(len);
+ return len;
+ }
+#endif
+
BOOL GetDlgItemText(int nID, BSTR& bstrText) const
{
ATLASSERT(::IsWindow(m_hWnd));