From: <ob...@us...> - 2006-07-27 17:26:08
|
Revision: 10847 Author: obones Date: 2006-07-27 10:25:58 -0700 (Thu, 27 Jul 2006) ViewCVS: http://svn.sourceforge.net/jvcl/?rev=10847&view=rev Log Message: ----------- GetWorkareaRect and FindMonitor moved here to allow access to the entire JVCL Modified Paths: -------------- trunk/jvcl/run/JvJVCLUtils.pas Modified: trunk/jvcl/run/JvJVCLUtils.pas =================================================================== --- trunk/jvcl/run/JvJVCLUtils.pas 2006-07-26 07:51:08 UTC (rev 10846) +++ trunk/jvcl/run/JvJVCLUtils.pas 2006-07-27 17:25:58 UTC (rev 10847) @@ -53,7 +53,7 @@ Qt, QWinCursors, QWindows, {$ENDIF VisualCLX} Forms, Graphics, Controls, StdCtrls, ExtCtrls, Menus, - Dialogs, ComCtrls, ImgList, Grids, IniFiles, + Dialogs, ComCtrls, ImgList, Grids, IniFiles, MultiMon, Classes, // must be after "Forms" JvVCL5Utils, JvJCLUtils, JvAppStorage, JvTypes; @@ -519,6 +519,9 @@ DefaultMappingMethod: TMappingMethod = mmHistogram; {$ENDIF VCL} +function GetWorkareaRect(Monitor: TMonitor): TRect; +function FindMonitor(Handle: HMONITOR): TMonitor; + procedure TileImage(Canvas: TCanvas; Rect: TRect; Image: TGraphic); function ZoomImage(ImageW, ImageH, MaxW, MaxH: Integer; Stretch: Boolean): TPoint; @@ -797,7 +800,7 @@ {$IFDEF VisualCLX} QConsts, {$ENDIF VisualCLX} - Math, + Math, JclSysInfo, JvConsts, JvProgressUtils, JvResources; @@ -4913,6 +4916,28 @@ end; {$ENDIF VCL} +function GetWorkareaRect(Monitor: TMonitor): TRect; +var + MonInfo: TMonitorInfo; +begin + MonInfo.cbSize := SizeOf(MonInfo); + GetMonitorInfo(Monitor.Handle, @MonInfo); + Result := MonInfo.rcWork; +end; + +function FindMonitor(Handle: HMONITOR): TMonitor; +var + I: Integer; +begin + Result := nil; + for I := 0 to Screen.MonitorCount - 1 do + if Screen.Monitors[I].Handle = Handle then + begin + Result := Screen.Monitors[I]; + Break; + end; +end; + { Quantizing } { Quantizing procedures based on free C source code written by Joe C. Oliphant, CompuServe 71742, 1451, joe_oliphant att csufresno dott edu } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |