본문 바로가기
코드/C++

std::to_wstring(int), _tow_s(int, wchar_t, 2 or 10);

by bongin 2023. 11. 16.
728x90
반응형

wchar_t buffer[256] = {};

GetWindowText(g_tow_in, buffer, sizeof(buffer));
::TextOut(hdc, 100, 100, buffer, lstrlen(buffer));
int i_Value = _wtoi(buffer);
std::wstring temp_str = std::to_wstring(i_Value);
::TextOut(hdc, 200, 100, temp_str.c_str(), temp_str.size());



wchar_t buffer[256] = {};
GetWindowText(g_tow_in, buffer, sizeof(buffer));
::TextOut(hdc, 100, 100, buffer, lstrlen(buffer));
int i_Value = _wtoi(buffer);
_itow_s(i_Value, buffer, 10);
::TextOut(hdc, 200, 100, buffer, lstrlen(buffer));

728x90
반응형

'코드 > C++' 카테고리의 다른 글

PE File Format, notepad  (0) 2024.06.10
release 배포 시 dll 오류 날 때  (2) 2023.11.21
class static, function static  (0) 2023.10.05
github open source rpg  (0) 2023.10.03
SFML CMAKE  (0) 2023.10.02

댓글