Share via

How does Microsoft's "inspect.exe" application keep its window on top?

Anonymous
2022-11-27T08:09:29.027+00:00

The window of the "inspect.exe" application can always stay on top of other windows, even when it is not focused. Its window will even be on the taskbar, above the application switching window of Alt + Tab. What technology is used in this magic?

Only when "inspect.exe" app stays on top of other windows when it's on C drive, when I put "inspect.exe" app on D drive it becomes mediocre (only its window gets focus It will be on top of other windows, which is the same as the general top window), if it is not on the C drive, even if I run it with administrator privileges, it does not have the magic of always being on the top

What parameters should be used when creating a window using win32 C++ API to achieve the same features as "inspect.exe"?

The performance of CreateWindowEx with WS_EX_TOPMOST is not the same. If I do this, I can only reach the state when "inspect.exe" is not in the C drive.

I am working on a screenshot tool, and I hope that the translucent mask window can cover other windows, so that there will be a better user experience.

I hope that friends who understand technology will share the inside story of technology, thank you very much

Windows development | Windows API - Win32

1 answer

Sort by: Most helpful
  1. RLWA32 52,546 Reputation points
    2022-11-27T09:35:28.533+00:00

    What technology is used in this magic?

    inspect.exe has uiAccess privileges. There are 3 requirements for the system to grant uiAccess privileges to an application.

    1. The application manifest must have uiAccess=true.
    2. The application must be signed with a trusted certificate.
    3. The application must reside in a secure location (e.g., a folder under C:\Program Files, the System32 folder).
    1 person found this answer helpful.
    0 comments No comments

Your answer

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