mirror of
https://github.com/reactos/reactos.git
synced 2025-07-25 23:14:09 +00:00
[ATL] CWindow: Add an overload of GetDlgItemText which takes a CSimpleString as parameter
This commit is contained in:
parent
deb908b038
commit
406c31cee8
1 changed files with 11 additions and 0 deletions
|
@ -575,6 +575,17 @@ public:
|
||||||
return ::GetDlgItemText(m_hWnd, nID, lpStr, nMaxCount);
|
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
|
BOOL GetDlgItemText(int nID, BSTR& bstrText) const
|
||||||
{
|
{
|
||||||
ATLASSERT(::IsWindow(m_hWnd));
|
ATLASSERT(::IsWindow(m_hWnd));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue