home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / Runimage / Delphi50 / Source / Rtl / Win / multimon.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-08-11  |  14.9 KB  |  459 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Borland Delphi Run-time Library                 }
  5. {       Win32 Multi-monitor support Unit                }
  6. {                                                       }
  7. {       Copyright (c) 1985-1999, Microsoft Corporation  }
  8. {                                                       }
  9. {       Translator: Inprise Corporation                 }
  10. {                                                       }
  11. {*******************************************************}
  12.  
  13. unit MultiMon;
  14.  
  15. (*
  16.  * MultiMon unit provides access to the new MultiMonitor
  17.  * APIs provided in Win98 and NT5 and greater.  For
  18.  * backwards compatibility, the new APIs are stubbed out
  19.  * here for older Win32 OS systems.
  20.  *)
  21.  
  22. interface
  23.  
  24. uses Windows;
  25.  
  26. {$HPPEMIT '#include <multimon.h>' }
  27.  
  28. const
  29.   { GetSystemMetrics() codes }
  30.   SM_XVIRTUALSCREEN = 76;
  31.   {$EXTERNALSYM SM_XVIRTUALSCREEN}
  32.   SM_YVIRTUALSCREEN = 77;
  33.   {$EXTERNALSYM SM_YVIRTUALSCREEN}
  34.   SM_CXVIRTUALSCREEN = 78;
  35.   {$EXTERNALSYM SM_CXVIRTUALSCREEN}
  36.   SM_CYVIRTUALSCREEN = 79;
  37.   {$EXTERNALSYM SM_CYVIRTUALSCREEN}
  38.   SM_CMONITORS = 80;
  39.   {$EXTERNALSYM SM_CMONITORS}
  40.   SM_SAMEDISPLAYFORMAT = 81;
  41.   {$EXTERNALSYM SM_SAMEDISPLAYFORMAT}
  42.   SM_CMETRICS = 83;
  43.   {$EXTERNALSYM SM_CMETRICS}
  44.  
  45. type
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.   HMONITOR = type Integer;
  54.   {$EXTERNALSYM HMONITOR}
  55.  
  56.  
  57. const
  58.   MONITOR_DEFAULTTONULL = $0;
  59.   {$EXTERNALSYM MONITOR_DEFAULTTONULL}
  60.   MONITOR_DEFAULTTOPRIMARY = $1;
  61.   {$EXTERNALSYM MONITOR_DEFAULTTOPRIMARY}
  62.   MONITOR_DEFAULTTONEAREST = $2;
  63.   {$EXTERNALSYM MONITOR_DEFAULTTONEAREST}
  64.   MONITORINFOF_PRIMARY = $1;
  65.   {$EXTERNALSYM MONITORINFOF_PRIMARY}
  66.  
  67. const
  68.   CCHDEVICENAME = 32;
  69.   {$EXTERNALSYM CCHDEVICENAME}
  70.  
  71. type
  72.   {$EXTERNALSYM tagMONITORINFOA}
  73.   tagMONITORINFOA = record
  74.     cbSize: DWORD;
  75.     rcMonitor: TRect;
  76.     rcWork: TRect;
  77.     dwFlags: DWORD;
  78.   end;
  79.   {$EXTERNALSYM tagMONITORINFOW}
  80.   tagMONITORINFOW = record
  81.     cbSize: DWORD;
  82.     rcMonitor: TRect;
  83.     rcWork: TRect;
  84.     dwFlags: DWORD;
  85.   end;
  86.   {$EXTERNALSYM tagMONITORINFO}
  87.   tagMONITORINFO = tagMONITORINFOA;
  88.   {$EXTERNALSYM MONITORINFOA}
  89.   MONITORINFOA = tagMONITORINFOA;
  90.   {$EXTERNALSYM MONITORINFOW}
  91.   MONITORINFOW = tagMONITORINFOW;
  92.   {$EXTERNALSYM MONITORINFO}
  93.   MONITORINFO = MONITORINFOA;
  94.   {$EXTERNALSYM LPMONITORINFOA}
  95.   LPMONITORINFOA = ^tagMONITORINFOA;
  96.   {$EXTERNALSYM LPMONITORINFOW}
  97.   LPMONITORINFOW = ^tagMONITORINFOW;
  98.   {$EXTERNALSYM LPMONITORINFO}
  99.   LPMONITORINFO = LPMONITORINFOA;
  100.   {$EXTERNALSYM PMonitorInfoA}
  101.   PMonitorInfoA = ^tagMONITORINFO;
  102.   {$EXTERNALSYM PMonitorInfoW}
  103.   PMonitorInfoW = ^tagMONITORINFO;
  104.   {$EXTERNALSYM PMonitorInfo}
  105.   PMonitorInfo = PMonitorInfoA;
  106.   {$EXTERNALSYM TMonitorInfoA}
  107.   TMonitorInfoA = tagMONITORINFO;
  108.   {$EXTERNALSYM TMonitorInfoW}
  109.   TMonitorInfoW = tagMONITORINFO;
  110.   {$EXTERNALSYM TMonitorInfo}
  111.   TMonitorInfo = TMonitorInfoA;
  112.  
  113.   {$EXTERNALSYM tagMONITORINFOEXA}
  114.   tagMONITORINFOEXA = record
  115.     cbSize: DWORD;
  116.     rcMonitor: TRect;
  117.     rcWork: TRect;
  118.     dwFlags: DWORD;
  119.     szDevice: array[0..CCHDEVICENAME] of AnsiChar;
  120.   end;
  121.   {$EXTERNALSYM tagMONITORINFOEXW}
  122.   tagMONITORINFOEXW = record
  123.     cbSize: DWORD;
  124.     rcMonitor: TRect;
  125.     rcWork: TRect;
  126.     dwFlags: DWORD;
  127.     szDevice: array[0..CCHDEVICENAME] of WideChar;
  128.   end;
  129.   {$EXTERNALSYM tagMONITORINFOEX}
  130.   tagMONITORINFOEX = tagMONITORINFOEXA;
  131.   {$EXTERNALSYM MONITORINFOEXA}
  132.   MONITORINFOEXA = tagMONITORINFOEXA;
  133.   {$EXTERNALSYM MONITORINFOEXW}
  134.   MONITORINFOEXW = tagMONITORINFOEXW;
  135.   {$EXTERNALSYM MONITORINFOEX}
  136.   MONITORINFOEX = MONITORINFOEXA;
  137.   {$EXTERNALSYM LPMONITORINFOEXA}
  138.   LPMONITORINFOEXA = ^tagMONITORINFOEXA;
  139.   {$EXTERNALSYM LPMONITORINFOEXW}
  140.   LPMONITORINFOEXW = ^tagMONITORINFOEXW;
  141.   {$EXTERNALSYM LPMONITORINFOEX}
  142.   LPMONITORINFOEX = LPMONITORINFOEXA;
  143.   {$EXTERNALSYM PMonitorInfoExA}
  144.   PMonitorInfoExA = ^tagMONITORINFOEX;
  145.   {$EXTERNALSYM PMonitorInfoExW}
  146.   PMonitorInfoExW = ^tagMONITORINFOEX;
  147.   {$EXTERNALSYM PMonitorInfoEx}
  148.   PMonitorInfoEx = PMonitorInfoExA;
  149.   {$EXTERNALSYM TMonitorInfoExA}
  150.   TMonitorInfoExA = tagMONITORINFOEX;
  151.   {$EXTERNALSYM TMonitorInfoExW}
  152.   TMonitorInfoExW = tagMONITORINFOEX;
  153.   {$EXTERNALSYM TMonitorInfoEx}
  154.   TMonitorInfoEx = TMonitorInfoExA;
  155.  
  156. {$EXTERNALSYM TMonitorEnumProc}
  157.   TMonitorEnumProc = function(hm: HMONITOR; dc: HDC; r: PRect; l: LPARAM): Boolean; stdcall;
  158. {$EXTERNALSYM TGetSystemMetrics}
  159.   TGetSystemMetrics = function(nIndex: Integer): Integer; stdcall;
  160. {$EXTERNALSYM TMonitorFromWindow}
  161.   TMonitorFromWindow = function(hWnd: HWND; dwFlags: DWORD): HMONITOR; stdcall;
  162. {$EXTERNALSYM TMonitorFromRect}
  163.   TMonitorFromRect = function(lprcScreenCoords: PRect; dwFlags: DWORD): HMONITOR; stdcall;
  164. {$EXTERNALSYM TMonitorFromPoint}
  165.   TMonitorFromPoint = function(ptScreenCoords: TPoint; dwFlags: DWORD): HMONITOR; stdcall;
  166. {$EXTERNALSYM TGetMonitorInfoA}
  167.   TGetMonitorInfoA = function(hMonitor: HMONITOR; lpMonitorInfo: PMonitorInfoA): Boolean; stdcall;
  168. {$EXTERNALSYM TGetMonitorInfoW}
  169.   TGetMonitorInfoW = function(hMonitor: HMONITOR; lpMonitorInfo: PMonitorInfoW): Boolean; stdcall;
  170.   {$EXTERNALSYM TGetMonitorInfo}
  171.   TGetMonitorInfo = TGetMonitorInfoA;
  172. {$EXTERNALSYM TEnumDisplayMonitors}
  173.   TEnumDisplayMonitors = function(hdc: HDC; lprcIntersect: PRect; lpfnEnumProc: TMonitorEnumProc;
  174.     lData: LPARAM): Boolean; stdcall;
  175.  
  176. var
  177.   {$EXTERNALSYM GetSystemMetrics}
  178.   GetSystemMetrics: TGetSystemMetrics;
  179.   {$EXTERNALSYM MonitorFromWindow}
  180.   MonitorFromWindow: TMonitorFromWindow; 
  181.   {$EXTERNALSYM MonitorFromRect}
  182.   MonitorFromRect: TMonitorFromRect; 
  183.   {$EXTERNALSYM MonitorFromPoint}
  184.   MonitorFromPoint: TMonitorFromPoint;
  185.   {$EXTERNALSYM GetMonitorInfoA}
  186.   {procedure}GetMonitorInfoA: TGetMonitorInfoA;
  187.   {$EXTERNALSYM GetMonitorInfoW}
  188.   {procedure}GetMonitorInfoW: TGetMonitorInfoW;
  189.   {$EXTERNALSYM GetMonitorInfo}
  190.   {procedure}GetMonitorInfo: TGetMonitorInfo;
  191.   {$EXTERNALSYM EnumDisplayMonitors}
  192.   EnumDisplayMonitors: TEnumDisplayMonitors;
  193.  
  194. implementation
  195.  
  196. type
  197.   TMultiMonApi = (mmGetSystemMetrics, mmMonitorFromWindow, mmMonitorFromRect,
  198.     mmMonitorFromPoint, mmGetMonitorInfo, mmGetMonitorInfoA, mmGetMonitorInfoW,
  199.     mmEnumDisplayMonitors);
  200.  
  201. const
  202.   xPRIMARY_MONITOR = HMONITOR($12340042);
  203.   sUser32 = 'USER32.DLL';
  204.  
  205. var
  206.   User32Dll: THandle;
  207.   InitApis: array [mmGetSystemMetrics..mmEnumDisplayMonitors] of Boolean;
  208.   MMAvailable: Boolean;
  209.  
  210. function InitAnApi(mmAPI: TMultiMonApi; ApiStub: Pointer; ApiName: string): Pointer;
  211. begin
  212.   Result := nil;
  213.   if not InitApis[mmApi] then
  214.   begin
  215.     if User32Dll <> 0 then
  216.     begin
  217.       if (mmAPI = mmGetSystemMetrics) and not MMAvailable then
  218.       begin
  219.         @GetMonitorInfo := InitAnApi(mmGetMonitorInfo, @GetMonitorInfo, 'GetMonitorInfoA');
  220.         if not MMAvailable then
  221.           ApiName := '';
  222.       end;
  223.       Result := GetProcAddress(User32Dll, PChar(ApiName))
  224.     end else Result := nil;
  225.     if not Assigned(Result) then
  226.       Result := ApiStub
  227.     else if (mmAPI <> mmGetSystemMetrics) then
  228.       MMAvailable := True;
  229.     InitApis[mmApi] := True;
  230.   end;
  231. end;
  232.  
  233. function _GetSystemMetrics(nIndex: Integer): Integer; stdcall;
  234. begin
  235.   if not InitApis[mmGetSystemMetrics] then
  236.   begin
  237.     @GetSystemMetrics := InitAnApi(mmGetSystemMetrics, @GetSystemMetrics, 'GetSystemMetrics');
  238.     Result := GetSystemMetrics(nIndex);
  239.     Exit;
  240.   end;
  241.  
  242.   Result := -1;
  243.   case nIndex of
  244.     SM_CMONITORS,
  245.     SM_SAMEDISPLAYFORMAT:
  246.       Result := 1;
  247.     SM_XVIRTUALSCREEN,
  248.     SM_YVIRTUALSCREEN:
  249.       Result := 0;
  250.     SM_CXVIRTUALSCREEN:
  251.       nIndex := SM_CXSCREEN;
  252.     SM_CYVIRTUALSCREEN:
  253.       nIndex := SM_CYSCREEN;
  254.   end;
  255.   if Result = -1 then
  256.     Result := Windows.GetSystemMetrics(nIndex);
  257. end;
  258.  
  259. function xMonitorFromRect(lprcScreenCoords: PRect; dwFlags: DWORD): HMONITOR; stdcall;
  260. begin
  261.   if not InitApis[mmMonitorFromRect] then
  262.   begin
  263.     @MonitorFromRect := InitAnApi(mmMonitorFromRect, @MonitorFromRect, 'MonitorFromRect');
  264.     Result := MonitorFromRect(lprcScreenCoords, dwFlags);
  265.     Exit;
  266.   end;
  267.  
  268.   Result := 0;
  269.   if Boolean(dwFlags and (MONITOR_DEFAULTTOPRIMARY or MONITOR_DEFAULTTONEAREST)) or
  270.     (lprcScreenCoords.Right > 0) and
  271.     (lprcScreenCoords.Bottom > 0) and
  272.     (lprcScreenCoords.Left < GetSystemMetrics(SM_CXSCREEN)) and
  273.     (lprcScreenCoords.Top < GetSystemMetrics(SM_CYSCREEN)) then
  274.       Result := xPRIMARY_MONITOR;
  275. end;
  276.  
  277. function xMonitorFromWindow(hWnd: HWND; dwFlags: DWORD): HMONITOR; stdcall;
  278. var
  279.   wp: TWindowPlacement;
  280. begin
  281.   if not InitApis[mmMonitorFromWindow] then
  282.   begin
  283.     @MonitorFromWindow := InitAnApi(mmMonitorFromWindow, @MonitorFromWindow, 'MonitorFromWindow');
  284.     Result := MonitorFromWindow(hWnd, dwFlags);
  285.     Exit;
  286.   end;
  287.  
  288.   if Boolean(dwFlags and (MONITOR_DEFAULTTOPRIMARY or MONITOR_DEFAULTTONEAREST)) then
  289.     Result := xPRIMARY_MONITOR
  290.   else
  291.   begin
  292.     if IsIconic(hWnd) then
  293.       GetWindowPlacement(hWnd, @wp)
  294.     else
  295.       GetWindowRect(hWnd, wp.rcNormalPosition);
  296.     Result := xMonitorFromRect(@wp.rcNormalPosition, dwFlags);
  297.   end
  298. end;
  299.  
  300. function xMonitorFromPoint(ptScreenCoords: TPoint; dwFlags: DWORD): HMONITOR; stdcall;
  301. begin
  302.   if not InitApis[mmMonitorFromPoint] then
  303.   begin
  304.     @MonitorFromPoint := InitAnApi(mmMonitorFromPoint, @MonitorFromPoint, 'MonitorFromPoint');
  305.     Result := MonitorFromPoint(ptScreenCoords, dwFlags);
  306.     Exit;
  307.   end;
  308.  
  309.   Result := 0;
  310.   if Boolean(dwFlags and (MONITOR_DEFAULTTOPRIMARY or MONITOR_DEFAULTTONEAREST)) or
  311.     (ptScreenCoords.X >= 0) and
  312.     (ptScreenCoords.X < GetSystemMetrics(SM_CXSCREEN)) and
  313.     (ptScreenCoords.Y >= 0 ) and
  314.     (ptScreenCoords.Y < GetSystemMetrics(SM_CYSCREEN)) then
  315.       Result := xPRIMARY_MONITOR;
  316. end;
  317.  
  318. function xGetMonitorInfoA(hMonitor: HMONITOR; lpMonitorInfo: PMonitorInfoA): Boolean; stdcall;
  319. var
  320.   rcWork: TRect;
  321. begin
  322.   if not InitApis[mmGetMonitorInfoA] then
  323.   begin
  324.     @GetMonitorInfoA := InitAnApi(mmGetMonitorInfoA, @GetMonitorInfoA, 'GetMonitorInfoA');
  325.     Result := GetMonitorInfoA(hMonitor, lpMonitorInfo);
  326.     Exit;
  327.   end;
  328.  
  329.   Result := False;
  330.   if (hMonitor = xPRIMARY_MONITOR) and (lpMonitorInfo <> nil) and
  331.     (lpMonitorInfo.cbSize >= DWORD(SizeOf(TMonitorInfo))) and
  332.     SystemParametersInfo (SPI_GETWORKAREA, 0, @rcWork, 0) then
  333.     begin
  334.       lpMonitorInfo.rcMonitor.Left := 0;
  335.       lpMonitorInfo.rcMonitor.Top := 0;
  336.       lpMonitorInfo.rcMonitor.Right := GetSystemMetrics(SM_CXSCREEN);
  337.       lpMonitorInfo.rcMonitor.Bottom := GetSystemMetrics(SM_CYSCREEN);
  338.       lpMonitorInfo.rcWork := rcWork;
  339.       lpMonitorInfo.dwFlags := MONITORINFOF_PRIMARY;
  340.       if (lpMonitorInfo.cbSize >= DWORD(SizeOf(TMonitorInfoEx))) then
  341.         lstrcpy(PMonitorInfoEx(lpMonitorInfo).szDevice, 'DISPLAY'); // do not localize
  342.       Result := True;
  343.     end;
  344. end;
  345. function xGetMonitorInfoW(hMonitor: HMONITOR; lpMonitorInfo: PMonitorInfoW): Boolean; stdcall;
  346. var
  347.   rcWork: TRect;
  348. begin
  349.   if not InitApis[mmGetMonitorInfoW] then
  350.   begin
  351.     @GetMonitorInfoW := InitAnApi(mmGetMonitorInfoW, @GetMonitorInfoW, 'GetMonitorInfoW');
  352.     Result := GetMonitorInfoW(hMonitor, lpMonitorInfo);
  353.     Exit;
  354.   end;
  355.  
  356.   Result := False;
  357.   if (hMonitor = xPRIMARY_MONITOR) and (lpMonitorInfo <> nil) and
  358.     (lpMonitorInfo.cbSize >= DWORD(SizeOf(TMonitorInfo))) and
  359.     SystemParametersInfo (SPI_GETWORKAREA, 0, @rcWork, 0) then
  360.     begin
  361.       lpMonitorInfo.rcMonitor.Left := 0;
  362.       lpMonitorInfo.rcMonitor.Top := 0;
  363.       lpMonitorInfo.rcMonitor.Right := GetSystemMetrics(SM_CXSCREEN);
  364.       lpMonitorInfo.rcMonitor.Bottom := GetSystemMetrics(SM_CYSCREEN);
  365.       lpMonitorInfo.rcWork := rcWork;
  366.       lpMonitorInfo.dwFlags := MONITORINFOF_PRIMARY;
  367.       if (lpMonitorInfo.cbSize >= DWORD(SizeOf(TMonitorInfoEx))) then
  368.         lstrcpy(PMonitorInfoEx(lpMonitorInfo).szDevice, 'DISPLAY'); // do not localize
  369.       Result := True;
  370.     end;
  371. end;
  372. function xGetMonitorInfo(hMonitor: HMONITOR; lpMonitorInfo: PMonitorInfo): Boolean; stdcall;
  373. var
  374.   rcWork: TRect;
  375. begin
  376.   if not InitApis[mmGetMonitorInfo] then
  377.   begin
  378.     @GetMonitorInfo := InitAnApi(mmGetMonitorInfo, @GetMonitorInfo, 'GetMonitorInfo');
  379.     Result := GetMonitorInfo(hMonitor, lpMonitorInfo);
  380.     Exit;
  381.   end;
  382.  
  383.   Result := False;
  384.   if (hMonitor = xPRIMARY_MONITOR) and (lpMonitorInfo <> nil) and
  385.     (lpMonitorInfo.cbSize >= DWORD(SizeOf(TMonitorInfo))) and
  386.     SystemParametersInfo (SPI_GETWORKAREA, 0, @rcWork, 0) then
  387.     begin
  388.       lpMonitorInfo.rcMonitor.Left := 0;
  389.       lpMonitorInfo.rcMonitor.Top := 0;
  390.       lpMonitorInfo.rcMonitor.Right := GetSystemMetrics(SM_CXSCREEN);
  391.       lpMonitorInfo.rcMonitor.Bottom := GetSystemMetrics(SM_CYSCREEN);
  392.       lpMonitorInfo.rcWork := rcWork;
  393.       lpMonitorInfo.dwFlags := MONITORINFOF_PRIMARY;
  394.       if (lpMonitorInfo.cbSize >= DWORD(SizeOf(TMonitorInfoEx))) then
  395.         lstrcpy(PMonitorInfoEx(lpMonitorInfo).szDevice, 'DISPLAY'); // do not localize
  396.       Result := True;
  397.     end;
  398. end;
  399.  
  400. function xEnumDisplayMonitors(hdcOptionalForPainting: HDC; lprcEnumMonitorsThatIntersect: PRect;
  401.     lpfnEnumProc: TMonitorEnumProc; dwData: LPARAM): Boolean; stdcall;
  402. var
  403.   rcLimit, rcClip: TRect;
  404.   ptOrg: TPoint;
  405.   ClipBox: Integer;
  406. begin
  407.   if not InitApis[mmEnumDisplayMonitors] then
  408.   begin
  409.     @EnumDisplayMonitors := InitAnApi(mmEnumDisplayMonitors, @EnumDisplayMonitors, 'EnumDisplayMonitors');
  410.     Result := EnumDisplayMonitors(hdcOptionalForPainting, lprcEnumMonitorsThatIntersect, lpfnEnumProc, dwData);
  411.     Exit;
  412.   end;
  413.  
  414.   Result := False;
  415.   if not Assigned(lpfnEnumProc) then Exit;
  416.  
  417.   rcLimit.Left := 0;
  418.   rcLimit.Top := 0;
  419.   rcLimit.Right := GetSystemMetrics(SM_CXSCREEN);
  420.   rcLimit.Bottom := GetSystemMetrics(SM_CYSCREEN);
  421.  
  422.   if hdcOptionalForPainting <> 0 then
  423.   begin
  424.     ClipBox := GetClipBox(hdcOptionalForPainting, rcClip);
  425.     if not GetDCOrgEx(hdcOptionalForPainting, ptOrg) then Exit;
  426.     OffsetRect(rcLimit, -ptOrg.x, -ptOrg.y);
  427.     if not (IntersectRect(rcLimit, rcLimit, rcClip) and
  428.       (lprcEnumMonitorsThatIntersect = nil) or
  429.       IntersectRect(rcLimit, rcLimit, lprcEnumMonitorsThatIntersect^)) then
  430.       begin
  431.         if ClipBox = NULLREGION then Result := True;
  432.         Exit;
  433.       end;
  434.    end else
  435.      if (lprcEnumMonitorsThatintersect <> nil) and
  436.        (not IntersectRect(rcLimit, rcLimit, lprcEnumMonitorsThatIntersect^)) then
  437.        begin
  438.          Result := True;
  439.          Exit;
  440.        end;
  441.    Result := lpfnEnumProc( xPRIMARY_MONITOR, hdcOptionalForPainting, @rcLimit, dwData);
  442. end;
  443.  
  444. procedure InitMultiMonStubs;
  445. begin
  446.   User32Dll := GetModuleHandle(sUser32);
  447.   @GetSystemMetrics := @_GetSystemMetrics;
  448.   @MonitorFromWindow := @xMonitorFromWindow;
  449.   @MonitorFromRect := @xMonitorFromRect;
  450.   @MonitorFromPoint := @xMonitorFromPoint;
  451.   {procedure}@GetMonitorInfoA := @xGetMonitorInfoA;
  452.   {procedure}@GetMonitorInfoW := @xGetMonitorInfoW;
  453.   {procedure}@GetMonitorInfo := @xGetMonitorInfo;
  454.   @EnumDisplayMonitors := @xEnumDisplayMonitors;
  455. end;
  456.  
  457. initialization
  458.   InitMultiMonStubs;
  459.  
  460. end.
  461.