相关疑难解决方法(0)

在 vista 之前使用 DwmIsCompositionEnabled (JwaDwmApi) 会导致错误

尝试使用以下代码来检查 Windows Aero 是否已启用:

function AeroEnabled: boolean;
var
  enabled: bool;
begin
 // Function from the JwaDwmapi unit (JEDI Windows Api Library)
 DwmIsCompositionEnabled(enabled);
 Result := enabled;

end;

 ...

 if (CheckWin32Version(5,4)) and (AeroEnabled) then
 CampaignTabs.ColorBackground   := clBlack
 else begin
 GlassFrame.Enabled             := False;
 CampaignTabs.ColorBackground   := clWhite;
 end;
Run Code Online (Sandbox Code Playgroud)

但是,在 Vista 之前的计算机上执行此操作会导致应用程序崩溃,因为缺少 DWMApi.dll。我也尝试过这段代码,但是它连续生成 2 个 AV。我怎样才能做到这一点 ?我正在使用 Delphi 2010。:)

delphi aero dwm jedi-code-library

0
推荐指数
1
解决办法
1524
查看次数

标签 统计

aero ×1

delphi ×1

dwm ×1

jedi-code-library ×1