Reference application / Windows 10+ / C++20

Build a real IDE-style docking workspace.

Documents and tools with native tabs, splits, floating and auto-hidden panels, mouse and keyboard docking, monitor recovery, and versioned layout restore.

ToolchainVS 2026 / MSVC / x64
IdentityStable nonzero logical IDs
OwnershipApplication content / borrowed HWNDs
ProofOffline GUI self-test

Build and verify

cmake --preset vs2026-x64
cmake --build --preset vs2026-x64-debug --target mwfl_docking_workspace_demo
ctest --test-dir build/presets/vs2026-x64 -C Debug \
  -R "mwfl\.(docking_|manifest\.mwfl_docking_workspace_demo)" --output-on-failure

Repeat with Release for the approved 0.7 local gate.

Keep state logical

DockLayoutModel owns pointer-free metadata snapshots. Your application owns documents, tool state, commands, and HWND lifetimes. Panel, group, node, and floating-host IDs remain stable across runs and are never derived from native handles.

Commit without losing the source

Every change follows propose, native prepare/adopt, logical commit, then native commit. Failed or stale changes roll native parentage, visibility, styles, and focus back to the original snapshot.

Make dragging optional

Pointer capture uses the system drag threshold and a nonactivating DPI-aware preview. Escape, capture loss, destruction, or failure cancels safely. The same targets are available through arrow and Tab navigation with Enter to accept.

Restore defensively

Layouts are versioned, bounded, pointer-free, and atomically replaced. Floating DIPs are recovered against current monitor work areas. Unknown, malformed, cyclic, or unreachable state falls back to a deterministic default.

Choose a focused recipe

The docking recipe index covers panel registration, tabs, splits, mouse and keyboard docking, floating, auto-hide, persistence, custom targets, and safe shutdown.