I encountered this error:
std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string(std::initializer_list<_Elem>,const _Alloc &)': cannot convert argument 1 from 'TCHAR *' to 'std::initializer_list<_Elem>'
Below I have added the code:
DWORD pid;
GetWindowThreadProcessId(hwnd, &pid);
if (pid == param) {
TCHAR classNameBuf[MAX_PATH];
GetClassName(hwnd, classNameBuf, MAX_PATH);
std::string className(&classNameBuf[0]);
if (className != ("MSCTFIME UI") && className != ("IME") && className != ("ConsoleWindowClass")) {
window_handle = hwnd;
return false;
}
}
return true;
}