From Scratching an Itch to a Tool I Can't Work Without: Building MirrorMe

A journey through native C++, Windows internals, and the satisfaction of solving your own problem properly.
The Itch
I have an ultrawide monitor. I also have an Elgato Prompter - a compact secondary display that sits in front of my webcam so I can read scripts while looking directly at the lens. It's a fantastic bit of kit, but it created a very specific problem.
When I'm in a Teams call, I want to see Teams on the Prompter - so I can read chat, see reactions, and keep situational awareness - while I continue working on the ultrawide. That sounds simple. It isn't. Windows doesn't have a built-in way to display the same window simultaneously on two monitors, live, with proper interactivity preserved on the primary.
The second problem showed up the moment I started demoing things. Sharing my ultrawide desktop in Teams looks terrible. An ultrawide is around 3440px wide - when scaled down for a remote viewer it becomes a tiny, unreadable mess. But switching which window I'm sharing mid-demo is jarring and breaks flow. What I actually wanted was to keep the window I was demonstrating on my ultrawide, and share a clean secondary monitor where just that window appeared - full screen, letterboxed, presentable. A quick hotkey: mirror it, do the demo, stop mirroring. No fuss.
That was the moment MirrorMe was born.
The Vision: One Job, Done Properly
Before writing a single line of code I set one rule for myself: do one thing and do it well.
No settings windows. No splash screen. No installer. No background service eating RAM. The tool should live in the system tray, invisible until needed, and disappear just as quietly when done. The entire workflow should be: right-click tray → pick window → pick monitor → done. Three interactions from cold start to mirroring.
I also decided early that this would be native C++ with Win32, no Electron, no .NET, no managed runtime. Not because I'm a purist, but because this tool needed to live at the OS level. It's capturing window content, rendering at display refresh rate, and processing global hotkeys - you don't want a garbage collector or a JavaScript runtime in that path. One .exe. One source file. Ship it.
V0.1: More Than a Prototype
May 3rd. The initial V0.1 Build commit landed as a single file: main.cpp at 1,808 lines. In one sitting I had:
- System tray with right-click menu for source window and target monitor selection
- A fullscreen borderless capture window that snaps to the selected monitor
- A notch popup - a slim control bar that peeks from the top centre of the mirror window, auto-hides, and slides out when you hover - for in-window controls
- Global hotkeys for zoom and a one-shot "mirror current foreground window" shortcut
- The beginnings of two display modes: Foreground Exclusive (the mirror sits on top) and Background Underlay (it sits below other windows)
- Transparency control from 0–100%
This wasn't a weekend hack. It was the result of being very clear about what the tool needed to be before writing any code. The architecture was already there.
Under the Hood: How the Mirror Actually Works
This is where it gets interesting.
Capture Path: Windows Graphics Capture + Direct3D11
The primary capture path uses the Windows Graphics Capture (WGC) API - the same API that powers the Windows built-in snip tool and Xbox Game Bar. You create a GraphicsCaptureItem for a target HWND, attach a Direct3D11CaptureFramePool, and frames arrive asynchronously on a FrameArrived callback.
m_framePool = Direct3D11CaptureFramePool::CreateFreeThreaded(
m_d3dDevice,
DirectXPixelFormat::B8G8R8A8UIntNormalized,
2,
size);
m_session = m_framePool.CreateCaptureSession(item);
m_frameArrivedToken = m_framePool.FrameArrived({this, &WgcCapture::OnFrameArrived});
m_session.StartCapture();
Frames land as Direct3D11 textures. On each frame timer tick (~60fps, 16ms interval), MirrorMe copies the latest texture to a CPU-readable staging texture, maps it, and blits it to the mirror window via StretchDIBits. The row pitch from the GPU is used directly as the bitmap width so GDI reads the correct memory-aligned stride - a subtle detail that trips up a lot of GPU-to-GDI bridges.
If WGC isn't available, or if capture fails to start (elevated-privilege windows, some protected content), MirrorMe automatically falls back to the classic Win32 GDI capture path via PrintWindow with a BitBlt fallback. No user interaction required - it just works.
The Notch: An Animated Control Bar
The notch is one of the design details I'm most pleased with. It's a slim 180×28px strip centred at the top of the mirror window. When you mouse away, it slides upward leaving just 4px visible - a subtle peek. When you hover, it animates back down in ~16ms steps. The state machine is four states: Visible, Hiding, Hidden, Showing.
enum class NotchState { Visible, Hiding, Hidden, Showing };
The notch hosts a horizontal DevBox-style button bar: icon over label, each button fixed-width with DPI scaling applied. Clicking a button opens a child flyout with contextual items - source windows, monitors, transparency slider, display mode, annotations.
DPI: The Hidden Complexity
Here's something nobody warns you about in Win32 programming: DPI scaling breaks everything you don't explicitly scale. My notch looked perfect on my ultrawide at 100% DPI. On a Surface at 150%, the popup was truncated - text overflowed the containers because the fonts were DPI-scaled but the container dimensions were hard-coded raw 96-DPI pixel values.
The fix was a PopScale() function applied to every layout constant:
static int PopScale(int px) { return MulDiv(px, (int)g_popDpi, 96); }
Sounds simple in retrospect. Finding it required actually testing on a Surface and methodically auditing every layout constant. This is the kind of thing you only discover by running the tool in the real world.
The Evolution: One Week, Six Iterations
The git history tells the story of a tool that moved fast because the user (me) was immediately using it for real work.
The ARM Discovery
While fixing other things I noticed window enumeration was wrong on ARM devices - apps like WhatsApp were being incorrectly excluded from the source window list. The EnumWindows filter logic was making assumptions about process architecture that didn't hold on ARM64. One commit, fixed.
Zoom + Mouse Wheel
My first zoom implementation was keyboard-only: Ctrl+Alt++ and Ctrl+Alt+-. Fine for coarse zoom, but useless for the precise "zoom into this area of the code I'm demoing" workflow. Adding Ctrl+Scroll mouse wheel zoom was a single session of work. Now I can spin the wheel to zoom into exactly what I want the audience to see, while keeping full context on the ultrawide. The zoom floors at 1:1 fit-to-window so you can't accidentally zoom out to nothing.
Pan followed naturally - hold middle mouse and drag to reposition the zoomed frame.
Drawing Annotations: From Mirror to Presentation Tool
This is the feature that pushed MirrorMe from "useful utility" to "tool I actively reach for every demo."
I added a freehand drawing overlay and a rectangle annotation mode. Toggle with Ctrl+Alt+D or the notch button. Draw with right mouse button (the left mouse is still used for pan). Six colours, three pen sizes, and a rectangle mode for boxing out regions of interest. Ctrl+Alt+D again clears all strokes.
The implementation layers Stroke objects - vectors of POINT for freehand, start/end for rectangles - over the mirrored frame on each paint cycle. It's rendered after the capture blit, before the window flip, so the annotations appear crisp on top of the live mirror.
struct Stroke {
std::vector<POINT> points;
COLORREF color = RGB(220, 50, 50);
int thickness = 3;
bool isRect = false;
};
Now during a live demo I can: mirror the relevant window, zoom to the relevant section, circle the thing I'm talking about in red, and clear it when I move on. All without touching Teams, without switching shared windows, without anyone on the call seeing anything except what I want them to see.
v1.1.1: Tray-First, Always
The final polish pass was about removing friction for myself. I had a "Start Minimised to Tray" toggle in the menu. I found I never wanted it any other way - the tool should always start in the tray. So I removed the toggle. It always starts minimised. Simpler.
I also added a first-run experience: a balloon notification from the tray icon telling new users where to find the tool, plus a notch peek animation on first launch so you know the control bar is there. Small details, but the kind of thing that means the tool makes sense to someone who's never seen it before.
The Setup Today
My current daily workflow looks like this:
- MirrorMe is in my startup folder. It's always there, always quiet.
- When I'm about to present: Ctrl+Alt+Shift+M - the current foreground window mirrors to my Elgato Prompter. I share the Prompter in Teams.
- I work on my ultrawide. Freely. Full screen. The audience sees a clean, full-screen view of exactly what I want.
- If I want to zoom into something: Ctrl+Scroll.
- If I want to highlight something: Ctrl+Alt+D, draw a box, keep talking.
- Done: Ctrl+Alt+Shift+M again. Mirror stops. Back to normal.
The whole thing - from the idea to a tool I use every working day - took just under a week of evenings. The V0.1 build was May 3rd. Version 1.1.1 shipped May 8th.
What I Learned
Build for yourself first. The fastest path from idea to genuinely useful is being your own most demanding user. Every feature in MirrorMe exists because I hit the problem personally, usually within minutes of the previous fix.
Native is still worth it. Yes, I could have built this in Electron in less time. It would have used 400MB of RAM, had a visible startup delay, and probably had GDI interop issues with WGC. The C++ binary is under 2MB. It starts in milliseconds. It never stutters.
The UX details compound. The notch animation, the DPI scaling, the first-run balloon - none of these are features. They're the difference between a tool you use and a tool you keep meaning to use.
Open source the small things. MirrorMe is on GitHub, MIT licensed, with a pre-built binary on the Releases page. The number of people who have my specific ultrawide + prompter setup is probably small. The number of people with some variation of "I want to mirror this window to that monitor" is much larger. Ship it publicly.
Try It
MirrorMe is free, open source, and available now at github.com/davidrrowley/MirrorMe.
Download the .exe from the Releases page, run it - no installer - and right-click the tray icon. You'll have a mirror running in under a minute.
If you have an ultrawide, a second screen, or you've ever wrestled with what to share in a Teams call, give it a go.
*Vibecoded with GitHub Copilot & Claude Sonnet 4.6 using native C++ on Windows. One source file. One executable. One job. *
Continue exploring