c++ - Multiple monitors and handles -
c++ - Multiple monitors and handles -
trying run loop through physical monitors handles confusing me, have pseudo code runs along lines of:
int tempcounter=0 for(counter = number of monitors;counter > 0;counter--){ rect temprect; hdc temphdc; resolution of dc handle (counter) -> temprect; arraylist[tempcounter] = temprect; virtual work area of dc handle (counter) -> temprect; arraylist[tempcounter++] = temprect; tempcounter++; }
getsystemmetrics(80) count of monitors, reliable plenty use, or exceptions might fail?
i know there not much there, looking on msdn kept me going around in circles, , not competent @ programming.
it can simple this:
#include <windows.h> #include <stdio.h> bool callback monitorenumproc( hmonitor hmonitor, hdc hdcmonitor, lprect lprcmonitor, lparam dwdata ) { printf("%dx%d\n", lprcmonitor->right, lprcmonitor->bottom); } int main(int argc, char*argv[]) { enumdisplaymonitors(null, null, monitorenumproc, 0); }
c++ resolution hdc monitors
Comments
Post a Comment