I'm still an extreme noob when it comes to C++. And one of the things (as of now) I currently hate, is the 1,000,000,000 different types of variables in winAPI. This small program I made to check if a window exists was made really quickly. But what's the hardest part? Simply comparing "strings" together to see if it's the match. The simplest part is the hardest!
Anyways, to my question: How can I compare a to toFind, to see if they match?
BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lparam){
TCHAR a[260];
string toFind = "Google Chrome";
hwnd = GetParent(hwnd);
GetWindowText(hwnd, a, sizeof(a));
if(strcmp(a,toFind) == 0){ //doesn't work
cout << "found the window";
}
return TRUE;
}