Post Reply

Forums -> Multiple monitors -> How to find the secondery screen left-top automatically
happygemini   2003-11-06 17:58
I detect the screen parameter with the api provided in msdn,but I only detect the visual screen lest-top, I want to get the secondary screen left-top value like (1024,0) .I test it by method like this:
for(int i=800;i<1200;++i)
{
HMONITOR hMonitor = ::MonitorFromPoint( CPoint( i,0 ), MONITOR_DEFAULTTONULL );
GetMonitorInfo( hMonitor, &lpmi );
TRACE("%d name is %s\n",i,lpmi.szDevice);
}
but the result is the same .
give me suggestion.
thank you

happygemini
blueznl   2003-12-29 21:24
i wrote some stuff in purebasic, but it is easily converted to any other language, see other post, try EnumDisplayDevices and EnumDisplaySettings
blueznl   2003-12-29 22:27
in purebasic:

info.MONITORINFOEX info\cb = SizeOf(info)
GetMonitorInfo_(x_monitor()\hnd,@info)
x = info\m_x1
y = info\m_y1
w = info\m_x2 - info\m_x1
h = info\m_y2 - info\m_y1

works fine
Forums -> Multiple monitors -> How to find the secondery screen left-top automatically

Post Reply