Repository navigation
Add interactive rectangle zoom to ActiveX control - #103
Conversation
Co-authored-by: Junie <junie@jetbrains.com>
Julian-MW
left a comment
There was a problem hiding this comment.
Automated review. Final decision is with the human reviewer.
The overlay rendering (DrawMouseZoomRectangle) is careful work: guarded GDI resource handling, correct exclusive-edge rectangle decomposition, sensible fallbacks, and msimg32 linked in both build systems. The drag lifecycle covers capture loss, cancel mode, size, wheel, and destroy.
The main concern is the zoom semantics (see the EndMouseZoom comment): the dragged rectangle is used as an anchor for ZoomAt rather than becoming the new view, so off-center selections end up partially off-screen — a deviation from MapWinGIS 5's zoom box and from the advertised "zoom to that area". The new hosted test mirrors the implementation and cannot catch this; strengthening it is covered in a separate comment.
Two smaller lifecycle notes outside the diff's immediate scope:
Close(DWORD)cancels pan but not the zoom drag (flagged on theOnDestroyaddition).- There is no Escape-to-cancel during a drag; adding it would need WM_KEYDOWN handling the control doesn't have yet — worth considering for parity with common GIS UX, but fine as a follow-up.
CI: all executed check runs are green; the Win32 build jobs are skipped by workflow configuration, not by this PR.
- Center the selected map area after zooming and preserve its visible extent. - Clear zoom state across close and resize, repainting when required. - Cover centering, containment, cancellation notifications, and windowless resize. Co-authored-by: Junie <junie@jetbrains.com>
Summary
Verification