至于《金山词霸2002》, 列表用的是TreeView, 倒可以读出来的, 测试代码如下:<br><br>--------------------<br>unit TreeViewEx;<br><br>interface<br><br>uses Windows;<br><br> // 读取TreeView存至ListBox, ^^<br>procedure TreeView_To_ListBox_Mz(hTreeView, hListBox: HWnd);<br><br>implementation<br><br>uses Messages, CommCtrl;<br><br> // 跨进程的 TreeView_GetItem<br>function TreeView_GetItem_Ex(hwndTV: HWND; var TVItem: TTVItem): Bool;<br>var<br> ProcessID, ProcessHD, Temp: DWORD;<br> pszText, MemPoint: Pointer;<br>begin<br> Result := FALSE;<br><br> GetWindowThreadProcessId(hwndTV, ProcessID);<br><br> ProcessHD := OpenProcess(<br> PROCESS_VM_OPERATION or PROCESS_VM_READ or PROCESS_VM_WRITE, FALSE, ProcessID);<br> if (ProcessHD = 0) then Exit;<br><br> MemPoint := VirtualAllocEx(ProcessHD, nil,<br> SizeOf(TTVItem) + TVItem.cchTextMax + 1,<br> MEM_COMMIT, PAGE_READWRITE);<br> if (MemPoint = nil) then Exit;<br><br> pszText := TVItem.pszText; // 保存本进程地址<br> PChar(pszText)^ := #0;<br> TVItem.pszText := PChar(Integer(MemPoint) + SizeOf(TTVItem));<br> if (WriteProcessMemory(ProcessHD, MemPoint, @TVItem, SizeOf(TVItem), Temp) = FALSE) then Exit;<br> if (WriteProcessMemory(ProcessHD, TVItem.pszText, pszText, 1, Temp) = FALSE) then Exit;<br><br> Result := (SendMessage(hwndTV, TVM_GETITEM, 0, LongInt(MemPoint)) <> 0);<br><br> if (ReadProcessMemory(ProcessHD, TVItem.pszText, pszText, TVItem.cchTextMax + 1, Temp) = FALSE) then<br> begin<br> Result := FALSE;<br> Exit;<br> end;<br> TVItem.pszText := pszText; // 恢复本进程地址<br><br> VirtualFreeEx(ProcessHD, MemPoint, SizeOf(TTVItem) + TVItem.cchTextMax + 1, MEM_DECOMMIT);<br> VirtualFreeEx(ProcessHD, MemPoint, 0, MEM_RELEASE);<br>end;<br><br> // 读取指定 TreeView 子项目文字<br>function TreeView_GetItem_Text(hwndTV: HWND; hitem: HTreeItem): string;<br>var<br> Buffer: array[0..50] of Char;<br> TVItem: TTVItem;<br>begin<br> TVItem.hItem := hitem;<br> TVItem.mask := TVIF_TEXT;<br> TVItem.pszText := @Buffer[0];<br> TVItem.cchTextMax := 50;<br><br> if TreeView_GetItem_Ex(hwndTV, TVItem) then<br> Result := Buffer<br> else<br> Result := '';<br>end;<br><br> // 读取TreeView存至ListBox, ^^<br>procedure TreeView_To_ListBox_Mz(hTreeView, hListBox: HWnd);<br>var<br> CurNode: HTreeItem;<br> CurText: string;<br>begin<br> CurNode := TreeView_GetRoot(hTreeView);<br> while (CurNode <> nil) do<br> begin<br> CurText := TreeView_GetItem_Text(hTreeView, CurNode);<br> if (CurText <> '') then SendMessage(hListBox, LB_ADDSTRING, 0, Integer(PChar(CurText)));<br><br> CurNode := TreeView_GetNextSibling(hTreeView, CurNode); // Next ..<br> end;<br>end;<br><br>end.<br><br>--------------------<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br> TreeView_To_ListBox_Mz(xxxx, ListBox1.Handle);<br>end;<br><br>--------------------