Get work area rectangle along with main rectangle of desktop

Use GetMonitorInfo. [sourcecode language=’cpp’]MONITORINFO miMonInfo = { 0 }; miMonInfo.cbSize = sizeof( miMonInfo ); // Get associated monitor for our window HMONITOR hMonitor = MonitorFromWindow( GetSafeHwnd(), MONITOR_DEFAULTTONEAREST ); // Get monitor information GetMonitorInfo( hMonitor, &miMonInfo ); // miMonInfo.rcWork –> Work area rectangle // miMonInfo.rcMonitor –> Monitor display rectangle[/sourcecode] To get name of monitor use MONITORINFOEX […]
Continue reading…