From: <cyc...@us...> - 2008-11-22 13:32:29
|
Revision: 2558 http://jcl.svn.sourceforge.net/jcl/?rev=2558&view=rev Author: cycocrew Date: 2008-11-22 13:32:24 +0000 (Sat, 22 Nov 2008) Log Message: ----------- Added Windows 7 and Windows Server 2008 R2 detection. Updated Security.dtx and SysInfo.dtx help files. Modified Paths: -------------- trunk/help/Security.dtx trunk/help/SysInfo.dtx trunk/jcl/install/JclInstall.pas trunk/jcl/source/common/JclResources.pas trunk/jcl/source/common/JclSysInfo.pas trunk/jcl/source/vcl/JclFont.pas trunk/jcl/source/windows/JclSecurity.pas Modified: trunk/help/Security.dtx =================================================================== --- trunk/help/Security.dtx 2008-11-16 14:09:05 UTC (rev 2557) +++ trunk/help/Security.dtx 2008-11-22 13:32:24 UTC (rev 2558) @@ -279,3 +279,20 @@ it always returns True. Donator: Anonymous +-------------------------------------------------------------------------------- +@@IsUACEnabled +<GROUP SystemInformationRoutines.UserAccountControl> +Summary: + Checks if UAC (User Account Control) is enabled or not on Windows Vista or + Windows Server 2008 or Windows 7 or Windows Server 2008 R2. +Description: + Checks if UAC (User Account Control) is enabled or not on Windows Vista or + Windows Server 2008 or Windows 7 or Windows Server 2008 R2. + UAC is enabled by default on Windows versions supporting this technology. +Result: + Returns True if UAC is enabled and OS version is Windows Vista or Windows Server 2008 or + Windows 7 or Windows Server 2008 R2. + Returns False if UAC is disabled or OS version is not Windows Vista nor Windows Server 2008 or + Windows 7 or Windows Server 2008 R2. +Donator: + Jean-Fabien Connault \ No newline at end of file Modified: trunk/help/SysInfo.dtx =================================================================== --- trunk/help/SysInfo.dtx 2008-11-16 14:09:05 UTC (rev 2557) +++ trunk/help/SysInfo.dtx 2008-11-22 13:32:24 UTC (rev 2558) @@ -530,10 +530,16 @@ Windows XP @@TWindowsVersion.wvWin2003 Windows Server 2003 +@@TWindowsVersion.wvWin2003R2 + Windows Server 2003 R2 @@TWindowsVersion.wvWinVista Windows Vista @@TWindowsVersion.wvWinServer2008 Windows Server 2008 +@@TWindowsVersion.wvWin7 + Windows 7 +@@TWindowsVersion.wvWinServer2008R2 + Windows Server 2008 R2 -------------------------------------------------------------------------------- @@TWindowsEdition <GROUP SystemInformationRoutines.VersionInformation> @@ -610,8 +616,11 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Marcel van Brakel -------------------------------------------------------------------------------- @@ -1269,7 +1278,7 @@ @@IsWin95 <GROUP SystemInformationRoutines.VersionInformation> Summary: - Returns whether the system is running Windows 95 + Returns whether the system is running Windows 95. Description: IsWin95 returns whether or not the system is running Windows 95. Result: @@ -1288,15 +1297,18 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Nick Hodges -------------------------------------------------------------------------------- @@IsWin95OSR2 <GROUP SystemInformationRoutines.VersionInformation> Summary: - Returns whether the system is running Windows 95 OSR 2 + Returns whether the system is running Windows 95 OSR 2. Description: IsWin95OSR2 returns whether or not the system is running Windows 95 OSR 2. Result: @@ -1315,15 +1327,18 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Nick Hodges -------------------------------------------------------------------------------- @@IsWin98 <GROUP SystemInformationRoutines.VersionInformation> Summary: - Returns whether the system is running Windows 98 + Returns whether the system is running Windows 98. Description: IsWin98 returns whether or not the system is running Windows 98. Result: @@ -1342,15 +1357,18 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Nick Hodges -------------------------------------------------------------------------------- @@IsWin98SE <GROUP SystemInformationRoutines.VersionInformation> Summary: - Returns whether the system is running Windows 98 SE + Returns whether the system is running Windows 98 SE. Description: IsWin98SE returns whether or not the system is running Windows 98 Second Edition. Result: @@ -1369,15 +1387,18 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Nick Hodges -------------------------------------------------------------------------------- @@IsWinME <GROUP SystemInformationRoutines.VersionInformation> Summary: - Returns whether the system is running Windows Millenium + Returns whether the system is running Windows Millenium. Description: IsWinME returns whether or not the system is running Windows Millenium. Result: @@ -1396,22 +1417,25 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Nick Hodges -------------------------------------------------------------------------------- @@IsWinNT <GROUP SystemInformationRoutines.VersionInformation> Summary: - Returns whether the system is running Windows NT + Returns whether the system is running Windows NT. Description: IsWinNT returns whether or not the system is running Windows NT. Result: If the system is running Windows NT the result is True otherwise the result is False. You can use the IsWinNT3, IsWinNT31, IsWinNT35, IsWinNT351, IsWinNT4, IsWin2K, IsWinXP, - IsWin2003, IsWinVista or IsWinServer2008 to further distinguish between the different NT - versions. + IsWin2003, IsWin2003R2, IsWinVista, IsWinServer2008, IsWin7 or IsWinServer2008R2 to further + distinguish between the different NT versions. See also: IsWin95 IsWin95OSR2 @@ -1426,15 +1450,18 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Nick Hodges -------------------------------------------------------------------------------- @@IsWinNT3 <GROUP SystemInformationRoutines.VersionInformation> Summary: - Returns whether the system is running Windows NT 3 + Returns whether the system is running Windows NT 3. Description: IsWinNT3 returns whether or not the system is running Windows NT 3. Result: @@ -1453,15 +1480,18 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Nick Hodges -------------------------------------------------------------------------------- @@IsWinNT31 <GROUP SystemInformationRoutines.VersionInformation> Summary: - Returns whether the system is running Windows NT 3.1 + Returns whether the system is running Windows NT 3.1. Description: IsWinNT31 returns whether or not the system is running Windows NT 3.1. Result: @@ -1480,15 +1510,18 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Nick Hodges -------------------------------------------------------------------------------- @@IsWinNT35 <GROUP SystemInformationRoutines.VersionInformation> Summary: - Returns whether the system is running Windows NT 3.5 + Returns whether the system is running Windows NT 3.5. Description: IsWinNT35 returns whether or not the system is running Windows NT 3.5. Result: @@ -1507,15 +1540,18 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Nick Hodges -------------------------------------------------------------------------------- @@IsWinNT351 <GROUP SystemInformationRoutines.VersionInformation> Summary: - Returns whether the system is running Windows NT 3.5.1 + Returns whether the system is running Windows NT 3.5.1. Description: IsWinNT351 returns whether or not the system is running Windows NT 3.5.1. Result: @@ -1534,8 +1570,11 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Nick Hodges -------------------------------------------------------------------------------- @@ -1561,15 +1600,18 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Nick Hodges -------------------------------------------------------------------------------- @@IsWin2K <GROUP SystemInformationRoutines.VersionInformation> Summary: - Returns whether the system is running Windows 2000 + Returns whether the system is running Windows 2000. Description: IsWin2K returns whether or not the system is running Windows 2000. Result: @@ -1588,15 +1630,18 @@ IsWinNT4 IsWinXP IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Marcel van Brakel -------------------------------------------------------------------------------- @@IsWinXP <GROUP SystemInformationRoutines.VersionInformation> Summary: - Returns whether the system is running Windows XP + Returns whether the system is running Windows XP. Description: IsWinXP returns whether or not the system is running Windows XP. Result: @@ -1615,8 +1660,11 @@ IsWinNT4 IsWin2K IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Petr Vones -------------------------------------------------------------------------------- @@ -1642,15 +1690,48 @@ IsWinNT4 IsWin2K IsWinXP + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Petr Vones -------------------------------------------------------------------------------- +@@IsWin2003R2 +<GROUP SystemInformationRoutines.VersionInformation> +Summary: + Returns whether the system is running Windows Server 2003 R2. +Description: + IsWin2003 returns whether or not the system is running Windows Server 2003 R2. +Result: + If the system is running Windows Server 2003 R2 the result is True otherwise the result is False. +See also: + IsWin95 + IsWin95OSR2 + IsWin98 + IsWin98SE + IsWinME + IsWinNT + IsWinNT3 + IsWinNT31 + IsWinNT35 + IsWinNT351 + IsWinNT4 + IsWin2K + IsWinXP + IsWin2003 + IsWinVista + IsWinServer2008 + IsWin7 + IsWinServer2008R2 +Donator: + Petr Vones +-------------------------------------------------------------------------------- @@IsWinVista <GROUP SystemInformationRoutines.VersionInformation> Summary: - Returns whether the system is running Windows Vista + Returns whether the system is running Windows Vista. Description: IsWinVista returns whether or not the system is running Windows Vista. Result: @@ -1670,10 +1751,43 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Florent Ouchet -------------------------------------------------------------------------------- +@@IsWin7 +<GROUP SystemInformationRoutines.VersionInformation> +Summary: + Returns whether the system is running Windows 7. +Description: + IsWinVista returns whether or not the system is running Windows 7. +Result: + If the system is running Windows 7 the result is True otherwise the result is False. +See also: + IsWin95 + IsWin95OSR2 + IsWin98 + IsWin98SE + IsWinME + IsWinNT + IsWinNT3 + IsWinNT31 + IsWinNT35 + IsWinNT351 + IsWinNT4 + IsWin2K + IsWinXP + IsWin2003 + IsWin2003R2 + IsWinVista + IsWinServer2008 + IsWinServer2008R2 +Donator: + Jean-Fabien Connault +-------------------------------------------------------------------------------- @@IsWinServer2008 <GROUP SystemInformationRoutines.VersionInformation> Summary: @@ -1697,10 +1811,43 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinVista + IsWin7 + IsWinServer2008R2 Donator: Florent Ouchet -------------------------------------------------------------------------------- +@@IsWinServer2008R2 +<GROUP SystemInformationRoutines.VersionInformation> +Summary: + Returns whether the system is running Windows Server 2008 R2. +Description: + IsWinServer2008 returns whether or not the system is running Windows Server 2008 R2. +Result: + If the system is running Windows Server 2008 R2 the result is True otherwise the result is False. +See also: + IsWin95 + IsWin95OSR2 + IsWin98 + IsWin98SE + IsWinME + IsWinNT + IsWinNT3 + IsWinNT31 + IsWinNT35 + IsWinNT351 + IsWinNT4 + IsWin2K + IsWinXP + IsWin2003 + IsWin2003R2 + IsWinVista + IsWin7 + IsWinServer2008 +Donator: + Jean-Fabien Connault +-------------------------------------------------------------------------------- @@NtProductType <GROUP SystemInformationRoutines.VersionInformation> Summary: @@ -1735,8 +1882,11 @@ IsWin2K IsWinXP IsWin2003 + IsWin2003R2 IsWinVista IsWinServer2008 + IsWin7 + IsWinServer2008R2 Donator: Marcel van Brakel Contributors: @@ -3127,7 +3277,7 @@ the version and vendor in the parameters passed. Parameters: Win - Handle of the window to use for rendering - \Version - the string to receive the library version information + Version - the string to receive the library version information Vendor - the string to receive the library vendor information Result: Surfaces the information provided by the OpenGL library (if any) relating to @@ -3140,7 +3290,7 @@ @@GetOpenGLVersionBitmapRendering <GROUP SystemInformationRoutines.VersionInformation> Summary: - Returns the current OpenGL library version string + Returns the current OpenGL library version string. Description: Takes a WinControl against which to perform the tests, and then returns the Version String information provided by the current OpenGL library. @@ -3152,19 +3302,4 @@ Surfaces the information provided by the OpenGL library (if any) relating to the version and vendor of the OpenGL library in the parameters passed. Donator: - Anonymous --------------------------------------------------------------------------------- -@@IsUACEnabled -<GROUP SystemInformationRoutines.UserAccountControl> -Summary: - Checks if UAC (User Account Control) is enabled or not on Windows Vista/Server 2008 -Description: - Checks if UAC (User Account Control) is enabled or not on Windows Vista/Server 2008. - UAC is enabled by default on Windows versions supporting this technology. -Result: - Returns True if UAC is enabled and OS version is Windows Vista or Windows Server 2008. - Returns False if UAC is disabled or OS version is not Windows Vista nor Windows Server 2008. -Donator: - Jean-Fabien Connault --------------------------------------------------------------------------------- - + Anonymous \ No newline at end of file Modified: trunk/jcl/install/JclInstall.pas =================================================================== --- trunk/jcl/install/JclInstall.pas 2008-11-16 14:09:05 UTC (rev 2557) +++ trunk/jcl/install/JclInstall.pas 2008-11-22 13:32:24 UTC (rev 2558) @@ -3807,7 +3807,7 @@ GUI.Dialog(RsHTMLHelp2Credentials, dtInformation, [drOK]); // RegHelper.exe manifest requires elevation on Vista - if IsAdministrator or IsWinVista or IsWinServer2008 then + if IsAdministrator or IsWinVista or IsWinServer2008 or IsWin7 or IsWinServer2008R2 then Verb := 'open' else Verb := 'runas'; Modified: trunk/jcl/source/common/JclResources.pas =================================================================== --- trunk/jcl/source/common/JclResources.pas 2008-11-16 14:09:05 UTC (rev 2557) +++ trunk/jcl/source/common/JclResources.pas 2008-11-22 13:32:24 UTC (rev 2558) @@ -1880,40 +1880,42 @@ RsUnknownAMDModel = 'Unknown AMD (Model %d)'; - RsOSVersionWin95 = 'Windows 95'; - RsOSVersionWin95OSR2 = 'Windows 95 OSR2'; - RsOSVersionWin98 = 'Windows 98'; - RsOSVersionWin98SE = 'Windows 98 SE'; - RsOSVersionWinME = 'Windows ME'; - RsOSVersionWinNT3 = 'Windows NT 3.%u'; - RsOSVersionWinNT4 = 'Windows NT 4.%u'; - RsOSVersionWin2000 = 'Windows 2000'; - RsOSVersionWinXP = 'Windows XP'; - RsOSVersionWin2003 = 'Windows Server 2003'; - RsOSVersionWin2003R2 = 'Windows Server 2003 "R2"'; - RsOSVersionWinXP64 = 'Windows XP x64'; - RsOSVersionWinVista = 'Windows Vista'; - RsOSVersionWinServer2008 = 'Windows Server 2008'; + RsOSVersionWin95 = 'Windows 95'; + RsOSVersionWin95OSR2 = 'Windows 95 OSR2'; + RsOSVersionWin98 = 'Windows 98'; + RsOSVersionWin98SE = 'Windows 98 SE'; + RsOSVersionWinME = 'Windows ME'; + RsOSVersionWinNT3 = 'Windows NT 3.%u'; + RsOSVersionWinNT4 = 'Windows NT 4.%u'; + RsOSVersionWin2000 = 'Windows 2000'; + RsOSVersionWinXP = 'Windows XP'; + RsOSVersionWin2003 = 'Windows Server 2003'; + RsOSVersionWin2003R2 = 'Windows Server 2003 R2'; + RsOSVersionWinXP64 = 'Windows XP x64'; + RsOSVersionWinVista = 'Windows Vista'; + RsOSVersionWinServer2008 = 'Windows Server 2008'; + RsOSVersionWin7 = 'Windows 7'; + RsOSVersionWinServer2008R2 = 'Windows Server 2008 R2'; - RsEditionWinXPHome = 'Home Edition'; - RsEditionWinXPPro = 'Professional'; - RsEditionWinXPHomeN = 'Home Edition N'; - RsEditionWinXPProN = 'Professional N'; - RsEditionWinXPHomeK = 'Home Edition K'; - RsEditionWinXPProK = 'Professional K'; - RsEditionWinXPHomeKN = 'Home Edition KN'; - RsEditionWinXPProKN = 'Professional KN'; - RsEditionWinXPStarter = 'Starter Edition'; - RsEditionWinXPMediaCenter = 'Media Center Edition'; - RsEditionWinXPTablet = 'Tablet PC Edition'; - RsEditionWinVistaStarter = 'Starter'; - RsEditionWinVistaHomeBasic = 'Home Basic'; - RsEditionWinVistaHomeBasicN = 'Home Basic N'; - RsEditionWinVistaHomePremium = 'Home Premium'; - RsEditionWinVistaBusiness = 'Business'; - RsEditionWinVistaBusinessN = 'Business N'; - RsEditionWinVistaEnterprise = 'Enterprise'; - RsEditionWinVistaUltimate = 'Ultimate'; + RsEditionWinXPHome = 'Home Edition'; + RsEditionWinXPPro = 'Professional'; + RsEditionWinXPHomeN = 'Home Edition N'; + RsEditionWinXPProN = 'Professional N'; + RsEditionWinXPHomeK = 'Home Edition K'; + RsEditionWinXPProK = 'Professional K'; + RsEditionWinXPHomeKN = 'Home Edition KN'; + RsEditionWinXPProKN = 'Professional KN'; + RsEditionWinXPStarter = 'Starter Edition'; + RsEditionWinXPMediaCenter = 'Media Center Edition'; + RsEditionWinXPTablet = 'Tablet PC Edition'; + RsEditionWinVistaStarter = 'Starter'; + RsEditionWinVistaHomeBasic = 'Home Basic'; + RsEditionWinVistaHomeBasicN = 'Home Basic N'; + RsEditionWinVistaHomePremium = 'Home Premium'; + RsEditionWinVistaBusiness = 'Business'; + RsEditionWinVistaBusinessN = 'Business N'; + RsEditionWinVistaEnterprise = 'Enterprise'; + RsEditionWinVistaUltimate = 'Ultimate'; RsProductTypeWorkStation = 'Workstation'; RsProductTypeServer = 'Server'; Modified: trunk/jcl/source/common/JclSysInfo.pas =================================================================== --- trunk/jcl/source/common/JclSysInfo.pas 2008-11-16 14:09:05 UTC (rev 2557) +++ trunk/jcl/source/common/JclSysInfo.pas 2008-11-22 13:32:24 UTC (rev 2558) @@ -273,7 +273,8 @@ TWindowsVersion = (wvUnknown, wvWin95, wvWin95OSR2, wvWin98, wvWin98SE, wvWinME, wvWinNT31, wvWinNT35, wvWinNT351, wvWinNT4, wvWin2000, wvWinXP, - wvWin2003, wvWinXP64, wvWin2003R2, wvWinVista, wvWinServer2008); + wvWin2003, wvWinXP64, wvWin2003R2, wvWinVista, wvWinServer2008, + wvWin7, wvWinServer2008R2); TWindowsEdition = (weUnknown, weWinXPHome, weWinXPPro, weWinXPHomeN, weWinXPProN, weWinXPHomeK, weWinXPProK, weWinXPHomeKN, weWinXPProKN, weWinXPStarter, weWinXPMediaCenter, @@ -309,6 +310,8 @@ IsWin2003R2: Boolean = False; IsWinVista: Boolean = False; IsWinServer2008: Boolean = False; + IsWin7: Boolean = False; + IsWinServer2008R2: Boolean = False; const PROCESSOR_ARCHITECTURE_INTEL = 0; @@ -2667,7 +2670,7 @@ else begin if IsWin2k or IsWinXP or IsWin2003 or IsWin2003R2 or IsWinXP64 or - IsWinVista or IsWinServer2008 then + IsWinVista or IsWinServer2008 or IsWin7 or IsWinServer2008R2 then begin FileName := ProcessFileName(ProcEntry.th32ProcessID); if FileName = '' then @@ -3292,13 +3295,23 @@ end; end; 6: - if Win32MinorVersion = 0 then - begin - OSVersionInfoEx.dwOSVersionInfoSize := SizeOf(OSVersionInfoEx); - if GetVersionEx(OSVersionInfoEx) and (OSVersionInfoEx.wProductType = VER_NT_WORKSTATION) then - Result := wvWinVista - else - Result := wvWinServer2008; + case Win32MinorVersion of + 0: + begin + OSVersionInfoEx.dwOSVersionInfoSize := SizeOf(OSVersionInfoEx); + if GetVersionEx(OSVersionInfoEx) and (OSVersionInfoEx.wProductType = VER_NT_WORKSTATION) then + Result := wvWinVista + else + Result := wvWinServer2008; + end; + 1: + begin + OSVersionInfoEx.dwOSVersionInfoSize := SizeOf(OSVersionInfoEx); + if GetVersionEx(OSVersionInfoEx) and (OSVersionInfoEx.wProductType = VER_NT_WORKSTATION) then + Result := wvWin7 + else + Result := wvWinServer2008R2; + end; end; end; end; @@ -3449,7 +3462,7 @@ end; end else - if IsWinXP or IsWinVista then // workstation + if IsWinXP or IsWinVista or IsWin7 then // workstation begin if GetVersionEx(OSVersionInfo) then begin @@ -3463,7 +3476,7 @@ end; end else - if IsWinServer2008 then // server + if IsWinServer2008 or IsWinServer2008R2 then // server begin if OSVersionInfo.wProductType in [VER_NT_SERVER,VER_NT_DOMAIN_CONTROLLER] then begin @@ -3521,10 +3534,14 @@ Result := RsOSVersionWin2003R2; wvWinXP64: Result := RsOSVersionWinXP64; + wvWinVista: + Result := RsOSVersionWinVista; wvWinServer2008: Result := RsOSVersionWinServer2008; - wvWinVista: - Result := RsOSVersionWinVista; + wvWin7: + Result := RsOSVersionWin7; + wvWinServer2008R2: + Result := RsOSVersionWinServer2008R2; else Result := ''; end; @@ -5574,6 +5591,10 @@ IsWinVista := True; wvWinServer2008: IsWinServer2008 := True; + wvWin7: + IsWin7 := True; + wvWinServer2008R2: + IsWinServer2008R2 := True; end; end; Modified: trunk/jcl/source/vcl/JclFont.pas =================================================================== --- trunk/jcl/source/vcl/JclFont.pas 2008-11-16 14:09:05 UTC (rev 2557) +++ trunk/jcl/source/vcl/JclFont.pas 2008-11-22 13:32:24 UTC (rev 2558) @@ -45,7 +45,7 @@ procedure SetCaptionFont(const AObjectFont: TFont); begin - if IsWinVista or IsWinServer2008 then + if IsWinVista or IsWinServer2008 or IsWin7 or IsWinServer2008R2 then begin AObjectFont.Name := 'Segoe UI'; AObjectFont.Size := 9; @@ -66,7 +66,7 @@ procedure SetContentFont(const AObjectFont: TFont); begin - if IsWinVista or IsWinServer2008 then + if IsWinVista or IsWinServer2008 or IsWin7 or IsWinServer2008R2 then begin AObjectFont.Name := 'Calibri'; AObjectFont.Size := 9; Modified: trunk/jcl/source/windows/JclSecurity.pas =================================================================== --- trunk/jcl/source/windows/JclSecurity.pas 2008-11-16 14:09:05 UTC (rev 2557) +++ trunk/jcl/source/windows/JclSecurity.pas 2008-11-22 13:32:24 UTC (rev 2558) @@ -32,7 +32,7 @@ { } {**************************************************************************************************} { } -{ Last modified: $Date:: $ } +{ Last modified: $Date:: $ } { Revision: $Rev:: $ } { Author: $Author:: $ } { } @@ -648,7 +648,7 @@ function IsUACEnabled: Boolean; begin - Result := (IsWinVista or IsWinServer2008) and + Result := (IsWinVista or IsWinServer2008 or IsWin7 or IsWinServer2008R2) and RegReadBoolDef(HKLM, '\Software\Microsoft\Windows\CurrentVersion\Policies\System', 'EnableLUA', False); end; @@ -665,7 +665,7 @@ ResultLength: Cardinal; ATokenElevation: TOKEN_ELEVATION; begin - if IsWinVista or IsWinServer2008 then + if (IsWinVista or IsWinServer2008 or IsWin7 or IsWinServer2008R2) then begin if OpenProcessToken(GetCurrentProcess, TOKEN_QUERY, TokenHandle) then begin This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |