[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1267":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":13,"lastSyncTime":29,"discoverSource":30},1267,"zencrop","melody0709\u002Fzencrop","melody0709","An independent reimplementation of PowerToys Crop And Lock. Always On Top","",null,"C++",306,2,276,1,0,3,4,17,9,1.43,false,"master",true,[],"2026-06-12 02:00:25","# ZenCrop v2.2.4\n\n[中文文档](doc\u002FREADME_zh.md)\n\nAn independent, **enhanced** reimplementation of [PowerToys Crop And Lock](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FPowerToys\u002Ftree\u002Fmain\u002Fsrc\u002Fmodules\u002FCropAndLock\u002F).\n\n---\n## 🔥 V2.2.0 & V2.2.1 Massive Update: The Ultimate Thumbnail Mode\n\nWe've completely rewritten the **Thumbnail Mode (Ctrl+Alt+C)**, breaking through the limits of the Windows DWM API to deliver features you won't find anywhere else:\n\n- **Strict Proportional Scaling**: Resize the cropped thumbnail freely via window edges or third-party tools like **AltSnap**. ZenCrop mathematically locks the aspect ratio so your crop never stretches and never shows black bars.\n- **Engine-Defeating Invisible Rendering**: Hide the original target window from your screen and taskbar entirely! Using a groundbreaking \"1-pixel anchor\" hack combined with COM interface manipulation, we trick modern engines (Chromium, Electron, WinUI) into rendering at a full 60 FPS in the background without pausing. Meanwhile, **V2.2.1** brings back the ZenCrop taskbar icon for the *Thumbnail window itself*, making it effortlessly easy to manage and bring to the front when buried behind other apps.\n\n📖 *Deep dive: [ZenCrop Thumbnail Scaling & Hiding Technology](doc\u002Fthumbnail_scaling_hiding_technology_en.md)*\n---\n\n## 🚀 Why ZenCrop over PowerToys?\n\nWhile the official PowerToys module suffers from an [\"all-white\u002Fblack screen\" known issue](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fwindows\u002Fpowertoys\u002Fcrop-and-lock#known-issues) when trying to reparent modern Windows applications (UWP\u002FWinUI\u002FXAML apps like Calculator or Settings), **ZenCrop has completely solved this.**\n\nZenCrop successfully supports interactive cropping of applications that the original PowerToys Crop And Lock explicitly cannot handle, utilizing two distinct cutting-edge rendering engines:\n\n**1. Native Viewport Cropping Technology:**\n- **Windows Calculator, Settings, Microsoft To Do** (Modern UWP apps)\n- Completely bypasses the \"all-white screen\" rendering bug by manipulating the window region instead of forcing a cross-process DWM visual tree attachment.\n📖 *Deep dive: [ZenCrop Viewport Technology Implementation Report](doc\u002Fviewport_technology_report_en.md)*\n\n**2. Deep Visual Tree Radar & Advanced Reparenting:**\n- **Windows 11 Paint** (Modern `DesktopChildSiteBridge` WinUI 3 apps)\n- **Magpie** and other traditional Win32 apps nesting modern XAML components (`DesktopWindowContentBridge`)\n- Intelligently circumvents fragile DWM composition rules, applies smart dark-mode background camouflage to prevent washed-out colors, and utilizes inverse coordinate compensation to perfectly align the crop without triggering fallback titlebars or crashes.\n📖 *Deep dive: [WinUI 3 Reparenting Technical Report](doc\u002FWinUI3_Reparenting_Fix.md)*\n\n## Background\n\nPowerToys Crop And Lock is a module in the Microsoft PowerToys toolkit that allows users to crop any window into a sub-window and pin it on screen. However, the original project is deeply tied to the PowerToys framework, making it difficult to use independently or customize.\n\nZenCrop is rebuilt from scratch, runs completely standalone without PowerToys, and provides a lighter solution while preserving and exceeding the core functionality.\n\n## Features\n\n- **Smart Reparent Mode**: Crops a target window into an independent child window. ZenCrop automatically detects modern UWP\u002FWinUI applications (like Calculator or Settings) and seamlessly falls back to a special **Viewport** mode. This prevents the \"all-white\" rendering bug associated with standard reparenting, ensuring all apps remain interactive.\n- **Thumbnail Mode**: Displays a live DWM thumbnail of the target window with a cornflower blue border. *New in V2.2.0 & V2.2.1:* the target window is stealthily hidden from the taskbar and screen while keeping Chromium\u002FElectron engines rendering at 60 FPS, and the thumbnail itself displays its own taskbar icon for easy window management. Supports strict proportional scaling via native window edge dragging or third-party tools like AltSnap.\n📖 *Deep dive: [ZenCrop Thumbnail Scaling & Hiding Technology](doc\u002Fthumbnail_scaling_hiding_technology_en.md)*\n- **Always On Top**: Press `Alt+T` to pin any window on top of all others, with a customizable border (color, opacity, thickness, rounded corners)\n- **Customizable Hotkeys**: All hotkeys can be customized in Settings — click the input field and press your desired key combo\n- **Crop On Top**: Optionally auto-pin cropped windows on top (configurable in Settings)\n- **Smart Window Detection**: The crop overlay automatically follows the mouse, dynamically highlighting the window under the cursor — crop any window on screen\n- **Smart Content Detection**: UI Automation-based element detection — the overlay automatically identifies the UI element under the cursor (browser title bar, address bar, content area, etc.) and suggests a crop region with a red dashed border\n- **Click to Accept**: Single-click accepts the smart suggestion; drag to manually draw a rectangle\n- **Crop Area Adjustment**: After drawing the crop rectangle, you can resize it by dragging edges\u002Fcorners, move it by dragging inside, and double-click to confirm — no more accidental crops\n  - **Arrow Key Control**: Fine-tune the crop box with keyboard in adjust mode — Arrow keys move 1px, Ctrl+Arrow expands, Shift+Arrow shrinks, Enter confirms\n  - **Coordinate Display**: Shows real-time coordinates and dimensions at the top-left corner (e.g., `1077, 864 — 320 x 240 px`)\n- **Borderless \u002F Titlebar Toggle**: Windows are borderless by default; toggle titlebar visibility via the tray menu\n- **Stale Window Cleanup**: Automatically removes Reparent\u002FThumbnail windows whose target has been closed externally\n- **System Tray**: Runs in the background; right-click the tray icon for the menu\n\n## Hotkeys\n\n| Hotkey | Action |\n|--------|--------|\n| `Ctrl+Alt+X` | Start Smart Reparent crop mode |\n| `Ctrl+Alt+C` | Start Thumbnail crop mode |\n| `Ctrl+Alt+V` | Force Viewport crop mode (Manual fallback) |\n| `Ctrl+Alt+Z` | Close all active crop windows |\n| `Alt+T` | Toggle Always On Top for the foreground window |\n| `ESC` | Cancel current crop rectangle \u002F cancel entire crop mode \u002F close focused Thumbnail window |\n| Right-click tray icon | Open menu (toggle titlebar \u002F settings \u002F exit) |\n\n> All hotkeys are customizable in Settings (right-click tray → Settings → ZenCrop \u002F Always On Top tab).\n\n## Usage\n\n1. Press `Ctrl+Alt+X` or `Ctrl+Alt+C` to enter crop mode\n2. Move the mouse — a red dashed border highlights the detected UI element under the cursor (smart detection via UI Automation)\n3. **Click** to accept the smart suggestion and enter adjust mode, or **drag** to manually draw a crop rectangle\n4. In **adjust mode**:\n   - Drag edges\u002Fcorners to resize\n   - Drag inside the rectangle to move\n   - Double-click inside the rectangle to confirm the crop\n   - **Arrow keys** (↑↓←→) to move the crop box by 1px\n   - **Ctrl+Arrow keys** to expand the corresponding edge by 1px\n   - **Shift+Arrow keys** to shrink the corresponding edge by 1px\n   - **Enter** to confirm (same as double-click)\n   - Press `ESC` to cancel the rectangle and redraw, press `ESC` again to exit\n   - Click outside the rectangle to cancel and redraw\n5. Press `Ctrl+Alt+Z` to close all Reparent windows\n6. Press `Alt+T` to toggle Always On Top for any window\n\n> **Note**: The desktop background cannot be selected as a crop target. Clicking on the desktop will automatically exit crop mode.\n\n## Settings\n\nRight-click the tray icon → **Settings** to open the tabbed settings dialog:\n\n- **ZenCrop tab**: Overlay color & thickness, Crop On Top toggle, Reparent\u002FThumbnail\u002FClose Reparent hotkey customization\n- **Always On Top tab**: Border visibility, color (system accent or custom), opacity, thickness, rounded corners, AOT hotkey customization\n\n## Tech Stack\n\n- **Language**: C++17\n- **Framework**: Native Windows Win32 API\n- **Dependencies**: user32, gdi32, dwmapi, shcore, shell32, ole32, oleaut32, shlwapi, comctl32, comdlg32, advapi32\n\n## Build\n\n### Prerequisites\n\n- Visual Studio 2022 (with vcvars64)\n- Windows SDK\n\n### Compile\n\n```bash\n# Using build.bat (recommended)\nbuild.bat\n\n# Or using CMake\ncmake -B build && cmake --build build\n```\n\nThe output is `ZenCrop.exe`.\n\n## Project Structure\n\n```\nzencrop\u002F\n├── main.cpp              # Entry point, system tray, message loop\n├── Utils.h\u002Fcpp           # Utility functions\n├── SmartDetector.h\u002Fcpp   # UI Automation smart content detection\n├── OverlayWindow.h\u002Fcpp   # Crop area selection overlay\n├── ReparentWindow.h\u002Fcpp  # Reparent mode window\n├── ThumbnailWindow.h\u002Fcpp # Thumbnail mode window\n├── ViewportWindow.h\u002Fcpp  # Viewport mode window (for modern apps)\n├── AlwaysOnTop.h\u002Fcpp     # Always On Top manager & border window\n├── Settings.h\u002Fcpp        # Unified settings dialog (AOT, overlay, hotkeys)\n├── app.ico               # Application icon\n├── resources.rc          # Dialog templates & icon resource\n├── app.manifest          # DPI awareness & compatibility\n├── build.bat             # MSVC build script\n├── CMakeLists.txt        # CMake configuration\n├── AGENTS.md             # AI development guide\n├── README.md\n└── doc\u002F\n    ├── CHANGELOG.md                   # Detailed changelog\n    ├── README_zh.md                   # Chinese documentation\n    ├── viewport_technology_report.md  # Tech report on Viewport mode (CN)\n    └── viewport_technology_report_en.md # Tech report on Viewport mode (EN)\n```\n\n## ☕ Buy Me a Coffee\n\nIf this project is helpful to you, please consider supporting it. Your support is the driving force for my continuous updates ❤️\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd align=\"center\" width=\"33%\">\n\u003Cimg src=\"assets\u002Fwechat.png\" width=\"250\" alt=\"WeChat Pay\">\u003Cbr>\n\u003Cb>WeChat Pay\u003C\u002Fb>\n\u003C\u002Ftd>\n\u003Ctd align=\"center\" width=\"33%\">\n\u003Cimg src=\"assets\u002Falipay.jpg\" width=\"250\" alt=\"Alipay\">\u003Cbr>\n\u003Cb>Alipay\u003C\u002Fb>\n\u003C\u002Ftd>\n\u003Ctd align=\"center\" width=\"33%\">\n\u003Ca href=\"https:\u002F\u002Fbuymeacoffee.com\u002Frelakkes\" target=\"_blank\">\n\u003Cimg src=\"https:\u002F\u002Fcdn.buymeacoffee.com\u002Fbuttons\u002Fv2\u002Fdefault-yellow.png\" width=\"250\" alt=\"Buy Me a Coffee\">\n\u003C\u002Fa>\u003Cbr>\n\u003Cb>Buy Me a Coffee\u003C\u002Fb>\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n---\n\n## License\n\nMIT License\n","ZenCrop 是一个独立且增强版的 PowerToys Crop And Lock 项目，允许用户裁剪任何窗口并将其固定在屏幕上。其核心功能包括严格比例缩放和引擎击败式隐形渲染技术，使得裁剪后的缩略图可以在保持原有比例的同时自由调整大小，并且能够隐藏原窗口而不影响后台渲染性能。此外，ZenCrop 解决了 PowerToys 在处理现代Windows应用程序时遇到的“全白\u002F黑屏”问题，支持对UWP、WinUI等复杂应用进行交互式裁剪。该项目特别适合需要频繁调整或监控特定窗口内容的专业人士使用，如开发者、设计师以及需要多任务管理的用户。","2026-06-11 02:42:42","CREATED_QUERY"]