There are various ways of getting a monitor.
You can get the monitor from a point,
from a rectangle,
or from a window.
But how do you get the primary monitor?
The primary monitor is defined to be the one
which has (0, 0) as its origin.
Therefore,
one solution
is
HMONITOR GetPrimaryMonitor...

on6 Nov 2014