Einzelnen Beitrag anzeigen

xaromz

Registriert seit: 18. Mär 2005
1.682 Beiträge
 
Delphi 2006 Enterprise
 
#3

Re: [Schattiere Fenster] - Schattierung ein/aus schalten

  Alt 9. Apr 2007, 09:34
Hallo,

einschalten kannst Du das so:
Delphi-Quellcode:
function ActivateDropShadow(const Handle: THandle): Boolean;

  function IsXP: Boolean;
  begin
    Result := (Win32Platform = VER_PLATFORM_WIN32_NT) and
      CheckWin32Version(5, 1);
  end;

const
  SPI_SETDROPSHADOW = $1025;
  CS_DROPSHADOW = $00020000;

var
  NewLong: Cardinal;
  B: Boolean;
begin
  B := True;
  if IsXP and SystemParametersInfo(SPI_SETDROPSHADOW, 0, @B, 0) then
  begin
    NewLong := GetClassLong(Handle, GCL_STYLE);
    NewLong := NewLong or CS_DROPSHADOW

    Result := SetClassLong(Handle, GCL_STYLE, NewLong) <> 0;
    if Result then
      SendMessage(Handle, CM_RECREATEWND, 0, 0);
  end else
    Result := False;
end;
Ausschalten hab ich leider noch nicht geschafft. Wenn das jemand weiß, ich bin sehr interessiert.

Gruß
xaromz
I am a leaf on the wind - watch how I soar
  Mit Zitat antworten Zitat