The goal is to be able to sketch directly on top of another foreground app with Milton.
To enter screen sketch mode, you launch Milton with a special command line switch. This would also be provided with a shortcut in the Windows Start Menu: In addition to the current "Milton" icon, there'd also be a "Milton Screen Sketch" icon.
When screen sketch mode is entered:
- Maximize window, set WS_EX_TOPMOST, and hide system title bar, frame and Milton's own menu.
- Implement this SO answer for DWM-accelerated OpenGL window transparency: https://stackoverflow.com/a/4055059
- Install a global keyboard hook to toggle whether Milton should be the foreground window. When it's in the foreground it can receive keyboard and tablet events as it usually would. SetForegroundWindow is restricted for security reasons, so this is only possible if a keyboard hook callback counts as the process "receiving the last input event". If this doesn't work, we can just use built-in Windows task switching via the task bar or alt-tabbi