vNAAATS/vatsim-NAAATS

Refactor cursor detection code

Closed this issue · 0 comments

Refactor into a ScreenFunctions class & support multi-monitor setups properly

  • Get monitor device context from cursor position (MonitorFromPoint could help)
  • Detect double click
  • Use ratios to relativise cursor position based on current monitor size to get correct lat/long (0 ≤ (position / monitor res) ≤ 1)

Useful links:
MonitorFromPoint()
GetMonitorInfo()
GetDeviceCaps()
GetSystemMetrics()
HMONITOR & hDC