AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Icons in TListView haben schwarzen Rand!

Ein Thema von mirage228 · begonnen am 25. Sep 2003 · letzter Beitrag vom 24. Apr 2005
Antwort Antwort
Benutzerbild von TimonWorld
TimonWorld

Registriert seit: 16. Jan 2004
Ort: Sankt Augustin
62 Beiträge
 
Delphi 3 Professional
 
#1

Re: Icons in TListView haben schwarzen Rand!

  Alt 24. Apr 2005, 12:32
Zitat von mirage228:
Hi,

der ImageList_Create() Befehl ist nicht in der Unit ShellAPI, sondern in der CommCtrl Unit deklariert.

mfG
mirage228
Hallo!

Stimmt... Ich hatte bei mir den Befehl nur an falscher Stelle platziert.

Aber funktionieren tut es so
Code:
Handle := ImageList_Create(16,16,ILC_COLOR32,255,0);
trotzdem nicht.

Aber ich habe mir jetzt dieses Convert ImageList (XP Fix) angeschaut und eingebunden:

Code:
//Diese Procedure habe ich hinzugefügt...
procedure ConvertTo32BitImageList(const ImageList: TImageList);
const
  Mask: array[Boolean] of Longint = (0, ILC_MASK);
var
  TemporyImageList: TImageList;
begin
  if Assigned(ImageList) then
  begin
    TemporyImageList := TImageList.Create(nil);
    try
      TemporyImageList.Assign(ImageList);
      with ImageList do
      begin
        ImageList.Handle := ImageList_Create(Width, Height, ILC_COLOR32 or Mask[Masked], 0, AllocBy);
        if not ImageList.HandleAllocated then
        begin
          raise EInvalidOperation.Create(SInvalidImageList);
        end;
      end;
      ImageList.AddImages(TemporyImageList);
    finally
      TemporyImageList.Free;
    end;
  end;
end;

//...und hier eingebunden.
constructor TNewImageList.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  ConvertTo32BitImageList(Self);
end;
Gruß,
Timon.
Timon
Tiicon - Die kostenlosen Glyphs für deine Toolbar...: Tiicon Hier im Forum suchenTiicon [df]Tiicon[/df] Bei Google suchenTiicon
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:42 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz