We need to pass a format _TCHAR * string, and a number of char * strings into a function with variable-length args:
inline void FooBar(const _TCHAR *szFmt,
this is something I have used before to convert a TCHAR to char, hope it helps, although I wasn't really looking for optimization, so it's not the fastest way.. but it worked!
TCHAR tmp[255];
::GetWindowText(hwnd, tmp, 255);
std::wstring s = tmp;
//convert from wchar to char
const wchar_t* wstr = s.c_str();
size_t wlen = wcslen(wstr) + 1;
char newchar[100];
size_t convertedChars = 0;
wcstombs_s(&convertedChars, newchar, wlen, wstr, _TRUNCATE);