WM_NOTIFY:
begin
pHDN := PHDNotify(lP);
hwndFrom := pHDN.hdr.hwndFrom;
if hwndFrom = HeaderHandle
then
begin
case pHDN.hdr.code
of
HDN_ITEMCHANGINGW, HDN_ITEMCHANGINGA:
begin
GetClientRect(hwndFrom, ClientRect);
dwPos := GetMessagePos;
p.x := LoWord(dwPos);
p.y := HiWord(dwPos);
ScreenToClient(hwndFrom, p);
ClientRect.Left := p.x + 2;
InvalidateRect(hwndFrom, ClientRect, True);
if sbHookedScrollbar.HasHorizontal
then
SendMessageW(
Handle, WM_HSCROLL, 4, 0);
end;
HDN_ITEMCLICKW, HDN_ITEMCLICKA:
begin
if pHDN.Button = 0
then
begin
UpDown :=
not UpDown;
If UpDown
then
ArrowOffset := 1
else
ArrowOffset := 2;
HeaderArrowCol := pHDN.Item;
GetClientRect(HeaderHandle, ClientRect);
InvalidateRect(HeaderHandle, ClientRect, True);
UpdateLParam(
Handle);
SortItems(
Handle, HeaderArrowCol);
end;
end;
end;
end else
if hwndFrom = WinHandle
then
begin
case pHDN.Hdr.code
of
NM_CLICK:
begin
SkinEngine.FInvalidateRect(WinHandle, False);
end;
end;
end;
end;