Quote Originally Posted by stampede View Post
Show the line of code that generates the error. If all you need is to call WinApi function that expects TCHAR *, you can use the L"" macro:
Qt Code:
  1. HRESULT someWinApiMethod( TCHAR * string );
  2. //...
  3. someWinApiMethod(L"a wide unicode string constant");
To copy to clipboard, switch view to plain text mode 
As for QStrings, you can use toWCharArray and fromWCharArray conversion methods.
That's a good suggestion. I convert some strings with this method and errors reduce. There are some other errors that I don't know how to solve:
for example

Qt Code:
  1. int cmp = _tcsnicmp(KeyNames[Middle].keyName, KeyString, _tcslen(KeyString));
  2. error: cannot convert 'TCHAR*' to 'char*' for argument '1' to 'char* strncpy(char*, const char*, size_t)'
  3.  
  4. while (*p && *p != _TXCHAR('}'))
  5. p++;
  6. error: '_TXCHAR' was not declared in this scope
  7.  
  8. _tcscpy(titleclass, WindowTitle);
  9. error: cannot convert 'TCHAR*' to 'const char*' for argument '1' to 'char* strstr(const char*, const char*)'
To copy to clipboard, switch view to plain text mode 

I suggest an expert, if has time, see the attached code in previous post and debug it. I'm sure it is a very useful program which can help many.