GetKeyNameText

Pages: 12
Yes I've got it with wcout xDDD

And sorry for the bump like that and I'm new with this forum so didnt know about the edit

Thnkcx you for evrythings

Oh

By the way

1
2
3
4
5
int len = GetWindowTextLength(GetForegroundWindow());
    TCHAR *winBuf = new TCHAR[len];
    GetWindowText(hWnd,winBuf,len+1);

    if(strcmp(winBuf,oldWinBuf) != 0)



winBuf and oldWinBuf they outputting an error

TCHAR* is incompatible with the type const TCHAR* not sure why
Last edited on
The correct function to use is _tcscmp, see MSDN documentation:
http://msdn.microsoft.com/en-us/library/e0z9k731(v=vs.80).aspx
I confirm, if you use char*'s you should use strcmp, if you use wchar_t*'s you should use wcscmp, if you use TCHAR*'s you should use tcscmp.

A little table:

Type    | Function
char*   | strcmp
wchar_t*| wcscmp
TCHAR*  | tcscmp
Last edited on
Topic archived. No new replies allowed.
Pages: 12