A
A
aquario-cloud2020-06-24 14:16:07
C++ / C#
aquario-cloud, 2020-06-24 14:16:07

How to take a screenshot of a specific area by coordinates?

There is a code that takes 4 handle coordinates.

void Window::getCoordinates() {
  RECT r;
  GetWindowRect(Window::pid.hWnd, &r);
  Window::coordinates[0] = r.bottom, Window::coordinates[1] = r.top;
  Window::coordinates[2] = r.right, Window::coordinates[3] = r.left;
}

You need to take a screenshot using 4 coordinates, so that later you can translate this screenshot into a file.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question