回答編集履歴
1
s/string/wstring/
test
CHANGED
@@ -8,13 +8,13 @@
|
|
8
8
|
|
9
9
|
```cpp
|
10
10
|
|
11
|
-
std::string buf;
|
11
|
+
std::wstring buf;
|
12
12
|
|
13
13
|
buf.resize(bufLen);
|
14
14
|
|
15
15
|
::SendMessage(hwnd, WM_GETTEXT, bufLen, (LPARAM)&buf[0]);
|
16
16
|
|
17
|
-
buf.resize(std::char_traits::length(buf.c_str());
|
17
|
+
buf.resize(std::char_traits<wchar_t>::length(buf.c_str());
|
18
18
|
|
19
19
|
```
|
20
20
|
|