An example of using DwmRegisterThumbnail to completely replicate content from another window and overlay custom content on top of it.
-
Change the target window:
CloneWindow cloneWindow((HWND)FindWindowA("UnrealWindow", NULL));
Replace
"UnrealWindow"with your target window class name. -
Implement your custom drawing: Write your drawing code in the
CustomDrawfunction:void CustomDraw(OverlayWindow* Overlay, int Width, int Height)
- Modify the window class name in step 1 to match the window you want to clone
- Implement your overlay graphics in the
CustomDrawfunction where you have access to the overlay window object and dimensions
