Based on this example:
[url:3e94ymr5]https://stackoverflow.com/questions/31579658/how-do-i-get-the-status-of-a-display[/url:3e94ymr5]
You could do:
#define MONITOR_DEFAULTTOPRIMARY 1
BOOL bResult;
GetDevicePowerState( MonitorFromWindow( FindWindow( 0, 0 ), MONITOR_DEFAULTTOPRIMARY ), &bResult )
[url:3e94ymr5]https://msdn.microsoft.com/en-us/library/windows/desktop/dd145064(v=vs.85).aspx[/url:3e94ymr5]
↧