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;