This commit is contained in:
Igor Pavlov 2023-06-21 00:00:00 +00:00
parent 93be7d4abf
commit 5b39dc76f1
951 changed files with 39855 additions and 24810 deletions

View file

@ -111,7 +111,7 @@ bool MySetWindowText(HWND wnd, LPCWSTR s)
}
#endif
bool CWindow::GetText(CSysString &s)
bool CWindow::GetText(CSysString &s) const
{
s.Empty();
unsigned len = (unsigned)GetTextLength();
@ -119,7 +119,7 @@ bool CWindow::GetText(CSysString &s)
return (::GetLastError() == ERROR_SUCCESS);
TCHAR *p = s.GetBuf(len);
{
unsigned len2 = (unsigned)GetText(p, (int)(len + 1));
const unsigned len2 = (unsigned)GetText(p, (int)(len + 1));
if (len > len2)
len = len2;
}
@ -130,7 +130,7 @@ bool CWindow::GetText(CSysString &s)
}
#ifndef _UNICODE
bool CWindow::GetText(UString &s)
bool CWindow::GetText(UString &s) const
{
if (g_IsNT)
{
@ -140,7 +140,7 @@ bool CWindow::GetText(UString &s)
return (::GetLastError() == ERROR_SUCCESS);
wchar_t *p = s.GetBuf(len);
{
unsigned len2 = (unsigned)GetWindowTextW(_window, p, (int)(len + 1));
const unsigned len2 = (unsigned)GetWindowTextW(_window, p, (int)(len + 1));
if (len > len2)
len = len2;
}
@ -150,7 +150,7 @@ bool CWindow::GetText(UString &s)
return true;
}
CSysString sysString;
bool result = GetText(sysString);
const bool result = GetText(sysString);
MultiByteToUnicodeString2(s, sysString);
return result;
}