AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Auslesen eines treeviews

Ein Thema von ghost007 · begonnen am 4. Dez 2006 · letzter Beitrag vom 16. Dez 2006
 
Benutzerbild von ghost007
ghost007

Registriert seit: 31. Okt 2005
Ort: München
1.024 Beiträge
 
Delphi 7 Personal
 
#6

Re: Auslesen eines treeviews

  Alt 6. Dez 2006, 19:12
ja ich habs mir schonma angeschaut aber ich komm damit nicht klar ... ich denk ma das ich diese stelle brauch,oder?
Delphi-Quellcode:
////////////////////////////////////////////////////////////////////////////////
//
// GetDesktopListView
// Desktop Listview Handle ermitteln
// Author: Nico Bendlin

function GetDesktopListView: HWND;
var
  Progman: HWND;
  DefView: HWND;
  function EnumDefViewProc(Wnd: HWND; out DefView: HWND): BOOL; stdcall;
  var
    ClassName: array[0..255] of Char;
  begin
    DefView := Wnd;
    ClassName[0] := #0;
    GetClassName(Wnd, ClassName, 255);
    Result := lstrcmp(ClassName, 'SHELLDLL_DefView') <> 0;
  end;
begin
  Result := HWND(nil);
  Progman := FindWindow('Progman', nil);
  if Progman <> HWND(nil) then
  begin
    DefView := FindWindowEx(Progman, HWND(nil), 'SHELLDLL_DefView', nil);
    if DefView <> HWND(nil) then
    begin
      if IsActiveDesktopActive then
        EnumChildWindows(DefView, @EnumDefViewProc, LPARAM(@DefView));
      Result := FindWindowEx(DefView, HWND(nil), 'SysListView32', nil);
    end;
  end;
  if Result = HWND(nil) then
    MessageBox(HWND(nil), PChar(ERROR_GETDESKTOPHANDLE), APPNAME,
      MB_ICONERROR);
end;

const
  ItemBufferBlockSize = $1000;

type
  PLvItemBuffer = ^TLvItemBuffer;
  TLvItemBuffer = packed record
    case Integer of
      0: (
        LvItem32: packed record
          mask: LongWord;
          iItem: LongInt;
          iSubItem: LongInt;
          state: LongWord;
          stateMask: LongWord;
          pszText: LongWord;
          cchTextMax: LongInt;
          iImage: LongInt;
          lParam: LongWord;
          iIndent: LongInt;
          iGroupId: LongInt;
          cColumns: LongWord;
          puColumns: LongWord
        end);
      1: (
        LvItem64: packed record
          mask: LongWord;
          iItem: LongInt;
          iSubItem: LongInt;
          state: LongWord;
          stateMask: LongWord;
          _align1: LongWord;
          pszText: Int64;
          cchTextMax: LongInt;
          iImage: LongInt;
          lParam: Int64;
          iIndent: LongInt;
          iGroupId: LongInt;
          cColumns: LongWord;
          _align2: LongWord;
          puColumns: Int64;
        end);
      2: (LvItemBuff: array[0..ItemBufferBlockSize - 1] of Byte;
        case Integer of
          0: (AnsiText: array[0..ItemBufferBlockSize - 1] of AnsiChar);
          1: (WideText: array[0..ItemBufferBlockSize div 2 - 1] of WideChar);
          2: (ItemText: array[0..ItemBufferBlockSize div SizeOf(Char) - 1] of
            Char));
  end;

type
  TFNIsWow64Process = function(hProcess: THandle; out Wow64Process: BOOL):
    BOOL; stdcall;

var
  FNIsWow64Process: TFNIsWow64Process;
Die is aber recht kompliziert ...

MfG - Ghost007
Christian
Es gibt möglich Dinge und unmöglich Dinge.
Für unmögliche braucht man lediglich etwas länger.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:28 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz