Skip to content

arBmind/desktop-duplication-cpp

Repository files navigation

Windows Desktop Duplication Tool

This is a nifty tool to host live coding in presentations or online screen grabbers.

Two in One

Since 3.0 we have two modes of operations.

Presenter Mode

You have your IDE and private notes on your main screen. The tool only captures the code portion of this screen and shows it fullscreen on your presentation monitor or projector.

Usage Schema

Personally I use this mode to host C++ usergroup meetings, team meetings and professional C++ trainings.

Capture Area Mode

You select a portion of the screen by moving the Window around. Once you go "Live" (Context Menu or Taskbar Menu) the Window will move into the background and display whatever is displayed on top of it.

Hint: Your mouse cursors will trail if you have no window in front of it.

Personally I use this mode to share part of my screen in Jitsi, Matrix, Big Blue Button, Teams, Zoom or any other conferencing tool.

Note: As soon as you select the window again, the capture will be pause and the contents of the window will be transparent to allow repositioning of the window without flickering.

Features

By top left part of the primary screen is duplicated to a window on the right part of the same screen.

Interactions:

  • Move the window whereever you need it. Beamers for live coding and presentations.

  • Right click with your mouse to open a context menu

    • Pause / Start the screen grabbing operations

    • Select some common resolutions for your screen share window

    • Select the monitor to capture for Presenter Mode (Capture Area mode will select the monitor the window is in)

    • Switch between Presenter and Capture Area Mode

  • Double Left Mouseclick maximizes the window.

    • The entire screen is now mirroring (no window frame)

    • We prevent Windows from going to sleep mode in this presentation mode

  • The Zoom also changes captured area.

    • Ctrl + Mousewheel ↕/+/- allows you to zoom

    • CtrlShift + Mousewheel ↕ zooms in smaller steps

    • Ctrl + 0 reset zoom to 1:1

  • Moving the captured area.

    • Shift + Left Mouse Button + Dragging ⇔⇕ allows you to move the visible portion

    • Shift + /// aligns the mirrored image to the border

  • Move Window into captured area.

    • Right Mouse Button + [Focus other Window] will position and resize the other window into the mirrored area. Not all windows will like this.

  • Interactions:

    • Note: You can hover over the window icon in the taskbar and use the buttons there.

    • Shift + Right Mouse Button toggle a visualisation of the captured area

    • Ctrl + P toggle pause. Freezes the image.

The tool is optimized to be very response and save CPU time.

History

3.x - TBA

  • Your Ideas are welcome (see Contributions)

3.0-beta - 2023-12-26

  • new capture area mode

  • keep capture alive while moving or resizing the window

  • select the monitor where the capture is taken

  • capture area indicator is now fully transparent for clicks

  • added context menu

  • also show live and frozen state in capture area border colors

2.0 - 2021-01-17

  • pause / freeze feature

  • visualization of state in taskbar

  • taskbar buttons for interactions

  • mitigated the double buffering bug (last change was missing)

  • performance enhancements (less CPU und GPU required)

  • cleaned up code base (easier to start new features)

1.0 - 2017-04-16 (Revision Easter Release)

  • first public version

  • hand crafted at the Revision Demo Party

  • basic features are working

Requirements

  • DirectX 11

  • Windows 10

Build yourself

The desktop duplicator was build using QtCreator with Qbs and MSVC2019.

The only other thing you need is the DirectX and Windows and WRL headers. All included in the Windows 10 SDK.

If you have issues please ask.

License

Read the LICENSE file!

Contributions

If you have issues or questions feel free to open a ticket.

If you can answer a question in a ticket, help is appreciated.

If you like the tool, leave a star on Github and spread the love.

All usefull pull requests are welcome! If you have an idea and are unsure, please open a ticket for discussions.

Enjoy!

\0