Skip to content

Add interactive rectangle zoom to ActiveX control - #103

Merged
pmeems merged 2 commits into
developmentfrom
ActiveX-improvements
Nov 29, 2026
Merged

pmeems merged 2 commits into
developmentfrom
ActiveX-improvements

Conversation

@pmeems

@pmeems pmeems commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Shift-drag rectangle zoom to the ActiveX control with a translucent blue selection overlay.
  • Update the sample host navigation hints and link alpha blending in both native build systems.
  • Add regression coverage for zoom interaction and overlay rendering.

Verification

  • Debug x64 CMake build and non-interactive CTest suite passed (579 tests, 8 skipped by suite configuration).
  • Focused overlay test and legacy ActiveX Debug x64 MSBuild build passed.
  • Existing MSVC D9025 /external:W0 override warnings remain; no new source warnings reported.

Co-authored-by: Junie <junie@jetbrains.com>
Copilot AI balanced review requested due to automatic review settings November 29, 2026 20:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@Julian-MW Julian-MW left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the OnDestroy addition).
  • 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>
Copilot AI balanced review requested due to automatic review settings November 29, 2026 21:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@pmeems
pmeems enabled auto-merge (squash) November 29, 2026 21:15
@pmeems
pmeems merged commit d0768b7 into development Nov 29, 2026
17 checks passed
@pmeems
pmeems deleted the ActiveX-improvements branch November 29, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants