From 230a2a4332d9ac83ad2ca588c353e0dcfc3535ff Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Mon, 1 Jan 2007 18:29:20 +0000 Subject: Added a fe comments to explain multi-monitor support on Win32 better. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5574 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/screen_xywh.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/screen_xywh.cxx b/src/screen_xywh.cxx index 836c4258a..c38a7ec96 100644 --- a/src/screen_xywh.cxx +++ b/src/screen_xywh.cxx @@ -40,6 +40,14 @@ static int num_screens = 0; # include # endif // !HMONITOR_DECLARED && _WIN32_WINNT < 0x0500 +// We go the much more difficult route of individually picking some multi-screen +// functions from the USER32.DLL . If these functions are not available, we +// will gracefully fall back to single monitor support. +// +// If we were to insist on the existence of "EnumDisplayMonitors" and +// "GetMonitorInfoA", it would be impossible to use FLTK on Windows 2000 +// before SP2 or earlier. + // BOOL EnumDisplayMonitors(HDC, LPCRECT, MONITORENUMPROC, LPARAM) typedef BOOL (WINAPI* fl_edm_func)(HDC, LPCRECT, MONITORENUMPROC, LPARAM); // BOOL GetMonitorInfo(HMONITOR, LPMONITORINFO) @@ -56,6 +64,7 @@ static BOOL CALLBACK screen_cb(HMONITOR mon, HDC, LPRECT r, LPARAM) { mi.cbSize = sizeof(mi); // GetMonitorInfo(mon, &mi); +// (but we use our self-aquired function pointer instead) if (fl_gmi(mon, &mi)) { screens[num_screens] = mi.rcWork; num_screens ++; @@ -84,6 +93,7 @@ static void screen_init() { // We have GetMonitorInfoA, enumerate all the screens... num_screens = 0; // EnumDisplayMonitors(0,0,screen_cb,0); +// (but we use our self-aquired function pointer instead) fl_edm(0, 0, screen_cb, 0); return; } -- cgit v1.2.3