This commit is contained in:
Igor Pavlov
2023-12-22 17:17:05 +00:00
committed by Kornel
parent ec44a8a070
commit a36c48cece
954 changed files with 42199 additions and 25482 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;
}