I am trying to draw on any monitor not the main monitor. I use the DISPLAY_DEVICE pointer and run through all 10 ports. I check
if (EnumDisplayDevices(0, [0-9],&DISPLAY_DEVICE,0)!=NULL)
If this is true, that means I found a connected display. I than check the StateFlags for main monitor by checking the third bit set.
If(!(DISPLAY_DEVICE.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE))
If it's not set and a display, it's not the main monitor.
If it is set and a display, it is the main monitor.
If I have 2 graphics card, on board GPU and Nvidia GPU on PCIe, and 1 monitor in both cards, I cant find a monitor that is a secondary monitor. All I find is both are set as main based on the state flags. Am I missing something does windows have a main for every GPU/Monitor combo?