mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 19:14:56 -06:00
23.01
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user