GetWindowRect() fails, but IsWindow() is not
I am trying to get the size of an external window:
POINT point;
point.x = 100;
point.y = 100;
HWND hwnd = WindowFromPoint(point);
LPRECT pRect = {0};
bool ret1 = IsWindow(hwnd);
bool ret = GetWindowRect(hwnd, pRect);
The return value of IsWindow is true, but GetWindowRect fails with the
following error:
1400: Invalid window handle
What can be wrong?
No comments:
Post a Comment