Why does EnumDisplayMonitors Still Return just Disconnected Monitor

Harshithraj1871 1,581 Reputation points
2025-02-11T06:48:09.9366667+00:00

I'm working om win32 Desktop application in CPP and I'm checking what happens if I try to fetch Display info with EnumDisplayMonitors when All displays are disconnected! Surprisingly it is giving display info of previously connected Display. Why is this so? Is it returning cached info?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,735 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.