diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2007-01-01 18:29:20 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2007-01-01 18:29:20 +0000 |
| commit | 230a2a4332d9ac83ad2ca588c353e0dcfc3535ff (patch) | |
| tree | b74d5aff916c491fb1386dc55f79ef3445c99536 | |
| parent | 2c16ddb964a8e13532f8e4c6e5bf0da0af283745 (diff) | |
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
| -rw-r--r-- | src/screen_xywh.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
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 <multimon.h> # 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; } |
