This successfully retrieves the screen coordinates but I would like it to display coordinates relative to a particular window that is being moused over:
POINT p;
if (GetCursorPos(&p))
{
std::cout << p.x << "," << p.y << std::endl;
//cursor position now in p.x and p.y
}
Can I modify the code to do that?