Hi, I've now completed some additional tests, and it seems that the return value of EnumDisplayMonitors() really depends on the return value of its callback on my system. Here is the minimal test case:
static wBOOL CALLBACK getMonitorInfoTestTRUE(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data) { return TRUE; } static wBOOL CALLBACK getMonitorInfoTestFALSE(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data) { return FALSE; } Inserted into QueryMonitor(): wBOOL result; result = EnumDisplayMonitors(NULL, NULL, getMonitorInfoTestTRUE, (LPARAM) data); ErrorF("getMonitorInfoTestTRUE returns: %d\n", (int)result); result = EnumDisplayMonitors(NULL, NULL, getMonitorInfoTestFALSE, (LPARAM) data); ErrorF("getMonitorInfoTestFALSE returns: %d\n", (int)result); When running "Xwin.exe :0 -screen 0 @1" this prints: getMonitorInfoTestTRUE returns: 1 getMonitorInfoTestFALSE returns: 0 I get the same results even when only one monitor is connected. If you can't reproduce this on your machine, then maybe it is related to the graphics driver. My configuration is NVIDIA 285.62 on Windows 7 (64-bit). ciao Jörg -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/