Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#2

AW: (NonVCL) ListView Ownerdraw Column Index

  Alt 23. Feb 2017, 09:10
Sorry Thread war unnötig
Nach dem schreiben bin ich selber auf die Lösung gekommen.

Manchmal ist man einfach nur Blöd

Delphi-Quellcode:
    WM_MOUSEMOVE:
      begin
        DC := GetDC(WinHandle);
        HeaderItemCount := Header_GetItemCount(WinHandle);
        for HeaderItem := 0 to HeaderItemCount - 1 do
        begin
          try
            GdipCheck(GdipCreateFromHDC(DC, Graphics));
            Header_GetItemRect(WinHandle, HeaderItem , @HeaderItemRect);

            GetCursorPos(CurPos);
            ScreenToClient(Handle, CurPos);

            if PtInRect(HeaderItemRect, CurPos) then
            begin
              TmpRect := HeaderItemRect;
              TmpRect.Right := HeaderItemRect.Right - HeaderItemRect.Left;
              SkinEngine.PaintButton(Graphics, 4, ImgBack, TmpRect.Left, TmpRect.Top,
                TmpRect.Right, TmpRect.Bottom, BS_PUSHBUTTON);
            end;
          finally
              if Graphics <> 0 then
                GdipCheck(GdipDeleteGraphics(Graphics));
          end;
        end;
        ReleaseDC(WinHandle, DC);
      end;
gruss
  Mit Zitat antworten Zitat