I am using this code its simple code but for some reason it always returning the partially covered despite the windows is fully covered or uncovered.
I am using this in the EnumWindows
HDC hdc = GetDC(hWnd);
if (hdc) {
RECT rcClip, rcClient;
switch (GetClipBox(hdc, &rcClip)) {
case NULLREGION:
LOGGER->info("completely covered"); break;
case SIMPLEREGION:
GetClientRect(hWnd, &rcClient);
if (EqualRect(&rcClient, &rcClip)) {
LOGGER->info("completely uncovered");
}
else {
LOGGER->info("partially covered");
}
break;
case COMPLEXREGION:
LOGGER->info("partially covered");
break;
default:
LOGGER->info("no result");
}
}