全部博文(788)
分类:
2008-11-27 21:16:49
用findCompent
已经解决了,但是'MDIClient'还不清楚是什么意思
//参考如下代码
var
vHandle: THandle;
begin
vHandle := FindWindow('TForm1', nil); //寻找MDI主窗体
Memo1.Lines.Add(IntToStr(vHandle));
vHandle := FindWindowEx(vHandle, 0, 'MDIClient', nil); //寻找MDI容器区域
Memo1.Lines.Add(IntToStr(vHandle));
vHandle := FindWindowEx(vHandle, 0, 'TForm3', nil); //寻找MDI子窗体
end;
FindWindowEx(
Parent: HWND; {a handle to a parent window}
Child: HWND; {a handle to a child window}
ClassName: PChar; {a pointer to a null terminated class name string}
WindowName: PChar {a pointer to a null terminated window name string}
): HWND; {returns a handle to a window}