![Quote](https://cboard.cprogramming.com/images/misc/quote_icon.png)
Originally Posted by
anon
May-be you should compare the title of the active window with the previous title and not if it is a different window?
Okay thanks, it just never crossed my mind that I could do this, but I'm still having a problem. I think I kind of know what I should do, that is capture the title and display that, then capture the title again under a different name and compare if they both are same, if they are not, then display the title again. I tried this like putting sleep intervals in between of like 10 seconds etc and then just visiting 2-3 diff sites and it captured them all, but I can't find a way to put all this like in a loop, function, or omg goto statement so it's constantly checking for change in title. I hate to ask for this, but I hope you or someone can actually post the actual code cuz I just can't think of a way how I would put it all together. Thanks. That's the code I have, I just need a way to put it in a while loop and then maybe make another boolean function which returns true if it changed or false etc but I don't know how to do this?
Code:
GetWindowText(GetForegroundWindow(), title, GetWindowTextLength(GetForegroundWindow()) + 1);
cout << title<< endl;
GetWindowText(GetForegroundWindow(), title2, GetWindowTextLength(GetForegroundWindow()) + 1);
if(!strstr(title, title2))