Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#1

WM_NOTIFY und eigenes Window Handle

  Alt 7. Apr 2019, 12:38
Mein Event

Delphi-Quellcode:
    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;
Das Problem hierbei ist warum tritt niemals dieser Status ein?
if hwndFrom = WinHandle then

Das einzige Handle das ich bekomme ist das des Header.
Warum?

EDIT:
Sorry habe mich da verhauen muss das von außen Händeln (Der Anwendung) nicht innerhalb meiner Library dann geht's.
In der Library komme ich nur das Handle meines Header.

Ist damit erledigt.

gruss

Geändert von EWeiss ( 7. Apr 2019 um 20:05 Uhr)
  Mit Zitat antworten Zitat