Skip to main content

Overview

Crop and Lock allows you to crop any window to display only a specific region of its content. The cropped area becomes an independent, always-visible window that updates in real-time with the source window, perfect for monitoring specific UI elements or data while working in other applications.
Cropped windows remain synchronized with their source windows, updating in real-time as the source content changes.

Activation

1

Enable Crop and Lock

Open PowerToys Settings and enable Crop and Lock
2

Select Window to Crop

Focus the window you want to crop
3

Trigger Crop Mode

Press the activation shortcut (default: Win+Ctrl+Shift+T) to enter crop mode
4

Select Region

Click and drag to select the area you want to crop
5

Confirm Selection

Release mouse button to create the cropped window

Key Features

Window Cropping

Interactive Selection

Click and drag to select any regionVisual overlay shows selection area

Real-Time Updates

Cropped window mirrors source contentLive synchronization

Independent Window

Cropped area becomes separate windowCan be moved and positioned anywhere

Reparenting

Window reparenting for content captureMaintains connection to source

Window Management

Cropped windows are fully manageable:
// Reparenting implementation (ReparentCropAndLockWindow.cpp:23)
ReparentCropAndLockWindow::ReparentCropAndLockWindow(
    std::wstring const& titleString, 
    int width, 
    int height)
{
    // Create independent window with WS_OVERLAPPEDWINDOW style
    auto style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN;
    style &= ~(WS_MAXIMIZEBOX | WS_THICKFRAME);
    
    CreateWindowExW(exStyle, ClassName.c_str(), titleString.c_str(), 
                    style, CW_USEDEFAULT, CW_USEDEFAULT, 
                    adjustedWidth, adjustedHeight, nullptr, nullptr, 
                    instance, this);
    
    m_childWindow = std::make_unique<ChildWindow>(width, height, m_window);
}
Features:
  • Non-resizable by default (no maximize/resize borders)
  • Can be moved freely
  • Always on top behavior
  • Maintains aspect ratio of cropped region

Overlay Selection Interface

When crop mode is activated:
  1. Visual Overlay: Semi-transparent overlay covers the window
  2. Selection Rectangle: Drag to define crop region
  3. Real-time Preview: See selected area highlighted
  4. Escape to Cancel: Press Esc to cancel without cropping

Focus Management

// Focus handling (ReparentCropAndLockWindow.cpp:62)
case WM_MOUSEACTIVATE:
    if (m_currentTarget != nullptr && 
        GetForegroundWindow() != m_currentTarget)
    {
        SetForegroundWindow(m_currentTarget);
    }
    return MA_NOACTIVATE;

case WM_ACTIVATE:
    if (static_cast<DWORD>(wparam) == WA_ACTIVE)
    {
        if (m_currentTarget != nullptr)
        {
            SetForegroundWindow(m_currentTarget);
        }
    }
    break;
Cropped windows don’t steal focus from the source window, maintaining seamless workflow.

Configuration

Activation Shortcut

activation_shortcut
hotkey
default:"Win+Ctrl+Shift+T"
Global hotkey to enter crop modeConfigurable in PowerToys Settings

Crop Behavior

No additional configuration options currently available. The utility provides straightforward crop-and-display functionality.

Use Cases

Monitoring Dashboard Widgets

Crop Task Manager’s performance graph:
1. Open Task Manager
2. Switch to Performance tab
3. Press Win+Ctrl+Shift+T
4. Select CPU graph area
5. Position cropped window in corner
→ Always-visible CPU monitoring
Monitor CI/CD dashboard status:
  1. Open build dashboard in browser
  2. Crop the build status section
  3. Keep visible while coding
  4. Instantly see build failures
Keep eye on stock prices:
  • Crop stock price widget from trading platform
  • Position on secondary monitor
  • Monitor prices while working

Video Conferencing

1

Crop Meeting Controls

Crop Zoom/Teams control panel from main meeting window
2

Position on Screen

Place cropped controls in accessible location
3

Full Screen Presentation

Share screen full screen, controls remain accessible
4

Mute/Unmute Easily

Use cropped controls without switching windows

Reference Material

Code Examples

Crop documentation example while codingKeep reference visible on screen

Design Specifications

Crop design specs sectionReference while implementing features

Chat Messages

Crop important chat conversationMonitor specific discussion thread

Terminal Output

Crop log section from terminalWatch for specific log messages

Multi-Application Workflows

Crop multiple charts from trading platform:
  1. Crop price chart
  2. Crop order book
  3. Crop portfolio summary
  4. Arrange cropped windows on screen
  5. Custom trading dashboard from single app

Gaming & Streaming

Create custom overlays from game UI:
  • Crop minimap from strategy game
  • Crop resource counters
  • Crop chat window
  • Arrange as custom HUD on secondary monitor
For streamers:
  • Crop streaming software stats (bitrate, FPS)
  • Crop chat window
  • Crop donation alerts
  • Monitor while gaming full screen

Technical Details

Architecture

Window Hierarchy

Reparent Window (Independent)
  └─ Child Window (Content Container)
      └─ Source Window Content (Mirrored)
The implementation uses three window layers:
  1. ReparentCropAndLockWindow: Top-level independent window
  2. ChildWindow: Container for captured content
  3. Content Mirror: Real-time display of source window region

Window Styles

// Window creation styles (ReparentCropAndLockWindow.cpp:30)
auto style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN;
style &= ~(WS_MAXIMIZEBOX | WS_THICKFRAME);

// Behaviors:
// WS_OVERLAPPEDWINDOW: Standard window with title bar
// WS_CLIPCHILDREN: Prevent parent drawing over child
// ~WS_MAXIMIZEBOX: No maximize button
// ~WS_THICKFRAME: No resize borders

Content Synchronization

Real-time mirroring mechanism:
  • DWM Integration: Uses Desktop Window Manager for content capture
  • Update Rate: Synchronized with source window refresh
  • Performance: Minimal CPU overhead, GPU-accelerated

Key Components

ComponentPurposeFile
ReparentCropAndLockWindowMain window containersrc/modules/CropAndLock/CropAndLock/ReparentCropAndLockWindow.cpp
ChildWindowContent display surfacesrc/modules/CropAndLock/CropAndLock/ChildWindow.cpp
OverlayWindowSelection interfacesrc/modules/CropAndLock/CropAndLock/OverlayWindow.cpp

Keyboard Shortcuts

Global

ShortcutAction
Win+Ctrl+Shift+TEnter crop mode (default)

During Crop Selection

ShortcutAction
Click + DragSelect crop region
EscCancel crop operation
Release MouseConfirm selection and create cropped window

Managing Cropped Windows

ActionMethod
MoveDrag title bar
CloseClick X button or Alt+F4
Always on TopUse Always On Top utility on cropped window
Combine Crop and Lock with Always On Top to ensure cropped windows stay visible above all other windows.

Troubleshooting

Check:
  • Crop and Lock is enabled in PowerToys Settings
  • Target window is in focus
  • Shortcut not conflicting with other applications
  • PowerToys is running
Test:
  • Try different target windows
  • Verify shortcut in PowerToys Settings
  • Restart PowerToys
Possible causes:
  • Source window using protected content (DRM)
  • Graphics driver issues
  • Source window minimized or hidden
Solutions:
  1. Ensure source window is visible and unminimized
  2. Update graphics drivers
  3. Some content (e.g., video players with DRM) cannot be cropped
Troubleshooting:
  • Check if source window is still open
  • Verify source window is not minimized
  • Close and recreate crop if sync is lost
Note: If source window closes, cropped window shows last captured frame
Verify:
  • Mouse cursor is over the target window
  • Window is not obscured by other windows
  • Graphics acceleration is enabled
Workaround: Try cropping a different window to test functionality
For high-DPI displays:
  • Cropped content should match source DPI
  • If blurry, check display scaling settings
  • Ensure PowerToys is DPI-aware
Windows Settings: System > Display > Scale and layout

Limitations

Content Protection: Some windows cannot be cropped due to content protection:
  • DRM-protected video players
  • Secure input fields (passwords)
  • Some fullscreen games with anti-cheat
  • Banking/financial application secure areas
These windows may show black or blank content in cropped windows.

Performance Considerations

  • Multiple Crops: Many cropped windows may impact performance
  • Large Regions: Larger crop areas use more GPU memory
  • High Refresh Rate: Source windows updating frequently may increase GPU usage
Best Practices:
  • Crop only necessary portions (smaller is better)
  • Close cropped windows when no longer needed
  • Limit simultaneous crops to 3-5 for best performance

See Also

Build docs developers (and LLMs) love