# TaskbarCalculator TaskbarCalculator is a C++/Win32 application for Windows 11 that sits in the notification area (system tray) and shows an always-on-top calculator window driven by keyboard input. The project started as a migration of a previous DeskBand (an in-process COM extension hosted by the taskbar), which Windows 11 no longer loads for third-party shell extensions. The current version is a standalone executable that adds a tray icon: left-click shows/hides the window, right-click opens a menu with Show/Hide, Start at login, About, and Exit. A global hotkey, **Win+Alt+C**, toggles the window from any application (if the combination is already taken by another app it is silently ignored, and the tray click still works). **Supported platforms:** Windows 10 and later (start-at-login relies on the WinRT `StartupTask` API, which requires Windows 10+). ## Code layout - `App.cpp` — entry point (`wWinMain`), single-instance handling, tray icon, and hidden owner window. - `CalculatorWindow.cpp/.h` — calculator window, keyboard input handling, number formatting based on regional settings, positioning and persistence. - `Calculator.cpp/.h` — calculation engine, independent from the UI, based on a state machine (`init`, `first_oper`, `operation`, `second_oper`, `result`, `error`). Supports the four basic operations, square root, percentage, sign change, and reciprocal (1/x). - `Settings.cpp/.h`, `StartupManager.cpp/.h`, `VisualStyle.cpp/.h`, `TrayIcon.cpp/.h`, `Utils.cpp/.h` — support modules (registry-based window position/visibility, start at login, classic/themed visuals, tray icon, misc utilities). More detailed architecture and conventions are documented in `CLAUDE.md`. ## Build Requires Visual Studio 2022 (v143 toolset), Windows SDK 10.0.26100.0, and the C++/WinRT components for the start-at-login feature. ``` msbuild TaskbarCalculator.vcxproj /p:Configuration=Debug /p:Platform=x64 msbuild TaskbarCalculator.vcxproj /p:Configuration=Release /p:Platform=x64 ``` Build the `.vcxproj` directly, not the `.sln` (which references a setup project not included in this repository). The executable is produced at `x64\\TaskbarCalculator.exe`. ## Test The calculation engine (`Calculator.cpp/.h`) is decoupled from the precompiled header and is compiled and run separately with a small header-only harness: ``` tests\build-and-run.cmd ``` from an "x64 Native Tools Command Prompt". ## Packaging Two distribution paths are supported: - **Classic installer**: `Packaging\TaskbarCalculatorSetup.iss`, compiled with Inno Setup (`ISCC.exe`), or via the `Packaging\build-setup.cmd` script, which runs a Release x64 build and compiles the installer in one step. - **MSIX**: PowerShell scripts in `Packaging\` (`MakeAssets.ps1`, `MakeCert.ps1`, `BuildMsix.ps1`), kept for a possible future Microsoft Store submission. In both cases, start-at-login uses the MSIX `StartupTask` API when the app is packaged, falling back to the `HKCU\...\Run` registry value when installed via the classic path. ## License Copyright (C) 2026 Marco Maroni TaskbarCalculator is free software: you can redistribute it and/or modify it under the terms of the **GNU General Public License version 3** as published by the Free Software Foundation. See the [`LICENSE`](LICENSE) file for the full text. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The GPLv3 is a strong copyleft license: any derivative work must also be released as open source under a GPL-compatible license, and incorporating this program into proprietary software is not permitted.