Looking around the net I see that most people think that GetDC(NULL) will get a device context for the entire primary monitor (the one with 0,0 at its top left). Ho
I'm currently trying to rewrite a gamma setter utility, because it is using GetDC(NULL) instead of EnumDisplayMonitors + GetDC, and as a result, changes the gamma of the entire desktop.
Your program is similar, it paints both displays black.