Falls nicht, dieser Code funktioniert beim mir (Vista!):
Delphi-Quellcode:
var
wnd: HWND;
begin
wnd := FindWindow('Progman', 'Program Manager');
wnd := FindWindowEx(wnd, 0, 'SHELLDLL_DefView', nil);
wnd := FindWindowEx(wnd, 0, 'SysListView32', 'FolderView');
if wnd <> 0 then
begin
Form1.ParentWindow := wnd;
end;
end;
Aber beachte bitte den Hinweis aus der Newsgroup, warum das keine gute Methode ist:
Zitat von
Raymond Chen:
Windows that attach themselves to the desktop create
all sorts of stability problems and compatibility nightmares. (For example,
suppose Explorer decides to destroy the desktop and recreate it. When a
window is destroyed, all its child windows are destroyed, so POOF your
window just got destroyed.)