This is not a complex question. I'm having trouble finding the handle that belongs to iTunes. But although iTunes is running in the background, it keeps telling me it can't find the window. So I went on checking whether I miss typed the window name, but spy++ pointed out to me that I was using the correct window name and class name (see below). I'm sure it's a small mistake but I can't seem to find it. Does anyone have an insight? Thanks in advance.
HWND hwnd;
hwnd = FindWindow((LPCWSTR)"iTunes",(LPCWSTR)"iTunes");
if (hwnd != 0){
cout << "WINDOW FOUND" << endl;
} else {
cout << "WINDOW NOT FOUND" << endl;
cout << hwnd << endl;
}