heYYape heYYape Back to all apps
Windows 8 / 10 / 11
MirrorOverlay app icon

MirrorOverlay

A frameless, always-on-top floating window that mirrors any other monitor — including a VDD virtual display (Indirect Display Driver, e.g. the MTT1337 Virtual Display Driver) — onto your main screen. Useful for keeping an eye on a headless / virtual screen that nothing is physically plugged into. Capture uses DXGI Desktop Duplication (GPU, 15–60 fps, includes the mouse cursor) with an automatic GDI BitBlt fallback. It auto-detects the VDD monitor on first run.

Build script (build.bat) Download source (MirrorOverlay.cpp) Resource script (app.rc) App icon (app.ico)
Controls
Ctrl+click notes: the click is injected with SendInput using MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_VIRTUALDESK — without VIRTUALDESK the coordinates are normalised over the primary monitor only and clicks land in the wrong place on a secondary display. Source pixels are converted to logical screen coordinates using the monitor's DPI ratio (this box's VDD is 1920×1080 physical but 1536×864 logical, i.e. 125%). Injected input cannot reach windows running at a higher integrity level, so an elevated target app will not see the click unless MirrorOverlay is also run elevated. The feature can be turned off from the right-click menu (“Ctrl+click sends a click to the source display”).
Flicker-free: everything is drawn into an offscreen buffer and blitted to the window in a single operation, and the window surface is only touched when the picture actually changes (new frame / cursor moved / option changed). The always-blank first frame DXGI returns right after connecting is discarded. If your source resolution is very high and you want more fps, switch Smooth scaling off (fast scaling instead of HALFTONE).
App icon: a 10-size app.ico (16 / 20 / 24 / 32 / 40 / 48 / 64 / 96 / 128 / 256, BMP entries for the small ones and PNG-compressed for 128 & 256) is compiled into the exe by app.rc and used for the file icon, the window and the tray. It is generated from scratch by make_icon.py — pure Python, no Pillow: signed-distance rendering with 4× supersampling, plus a hand-rolled PNG writer and ICO packer. The glyph is the overlay panel (accent blue, with a title bar) floating over the dimmer source display it mirrors. Small sizes get their own hinting tier (thicker strokes, bigger panels, no content lines) so 16×16 stays legible in the tray.
Build from source

Download the four required files below into one empty folder and run build.bat. Needs MinGW-w64 / g++ (the script auto-detects the usual install path, otherwise falls back to g++ on PATH). No IDE, no make, no dependencies to install.

FileSizeWhat it is
MirrorOverlay.cpprequired 54 KB The whole program — single translation unit: Win32 window, DXGI desktop duplication + GDI BitBlt capture, zoom / pan, Ctrl+click injection, tray icon, ini settings.
app.rcrequired 1 KB Resource script. Embeds app.ico as resource 101 and adds the version-info block (file description, product name, version) you see in Explorer's Properties dialog.
app.icorequired 97 KB The app icon referenced by app.rc: 10 sizes (16 / 20 / 24 / 32 / 40 / 48 / 64 / 96 / 128 / 256). Windows drops it on Explorer / taskbar / Alt-Tab, and the program loads resource 101 for the window and the tray icon. Build still succeeds without it, but the exe ends up with the generic icon.
build.batrequired 1 KB One-shot build: runs windres on app.rc to make app_res.o, then compiles and links MirrorOverlay.exe. Safe to re-run; it skips the resource step automatically if app.rc is absent.
make_icon.pyoptional 9 KB Regenerates app.ico from scratch — pure standard-library Python, no Pillow needed. Only needed if you want to tweak the icon. See the App icon note above.
preview_sizes.pyoptional 3 KB Renders a contact sheet of the icon at every size on light and dark backgrounds. Companion to make_icon.py while editing.
smoketest.cppoptional 10 KB Verification harness: launches the exe, samples the composited desktop where the overlay sits, and asserts the picture is actually there (flicker scan, zoom / pan deltas). Not linked into the app.
icontest.cppoptional 7 KB Checks the embedded icon: enumerates RT_GROUP_ICON in the built exe, extracts both icon sizes, and reads back the running window's icons.
probe.cppoptional 10 KB Diagnostic: lists every monitor, its device name and DPI, and reports whether DXGI DuplicateOutput works on each one. Handy for confirming a virtual display is capturable before running the app.

Equivalent to running by hand (this is exactly what build.bat does):

rem 1. compile the resource (icon + version info) - see note below about the 8.3 path
windres -I. -O coff -i app.rc -o app_res.o

rem 2. compile and link
g++ -O2 -mwindows MirrorOverlay.cpp app_res.o -o MirrorOverlay.exe ^
    -ld3d11 -ldxgi -ldxguid -lgdi32 -luser32 -lshell32 -lwinmm

Gotcha with windres: if MinGW lives under C:\Program Files\..., invoking it by its long path fails with 'C:\Program' is not recognized / preprocessing failedwindres derives the preprocessor path from its own location and does not quote it. Call it through the 8.3 short path instead (C:\PROGRA~1\...), which is what build.bat does. Running the app's folder from a path with spaces is fine; only the windres call is affected.

Runtime settings are written to MirrorOverlay.ini next to the exe — delete it to reset to defaults. If a link above downloads as text, right-click and choose Save link as….