You have two options:
- Use ANSI text. Do so by using
TASKDIALOGCONFIGA
andTaskDialogIndirectA
. - Use Unicode text. Switch your strings from
std::string
tostd::wstring
.
I personally would recommend the latter option.
I would also recommend that you do not use tchar.h
, and stop using _T(...)
. Since you are only targeting Unicode, you should write L"Error"
rather than _T("Error")
. It only makes sense to use tchar.h
if you are writing code that must compile for both MBCS and Unicode targets. That was a necessary evil in the days when we needed to compile for Win 95/98 and Win NT/2000. But those days are long gone.