Einzelnen Beitrag anzeigen

Benutzerbild von stahli
stahli

Registriert seit: 26. Nov 2003
Ort: Halle/Saale
4.337 Beiträge
 
Delphi 11 Alexandria
 
#3

Re: Maus-transparente Komponente

  Alt 4. Jan 2008, 10:49
Super Klasse!
Danke!

Delphi-Quellcode:
  procedure CMHitTest(var Msg: TWMMouse); message CM_HITTEST;

  procedure TLine.CMHitTest(var Msg: TWMMouse);
  begin
    inherited;
  {
    if Assigned(PicUp) and Assigned(PicUp.Bitmap) and Transparent and
      (Msg.XPos < PicUp.Bitmap.Width) and (Msg.YPos < PicUp.Bitmap.Height) and
      (PicUp.Bitmap.Canvas.Pixels[Msg.XPos, Msg.YPos] = (Picture.Bitmap.TransparentColor and $FFFFFF)) then
      Msg.Result := 0;
  }

    Msg.Result := 0;
  end;
Da ich keine Transparent-Farbe habe setze ich Result einfach immer auf 0. Perfekt!

stahli
  Mit Zitat antworten Zitat