[阅读: 378] 2009-05-11 07:24:06
procedure TForm1.BitBtn1Click(Sender: TObject);
var
lstyle: Cardinal;
PHandle: THandle;
begin
PHandle := FindWindow('Outlook Express Browser Class', nil);
if PHandle <> 0 then
begin
lstyle := getwindowlong(self.Handle, GWL_STYLE);
lstyle := lstyle and not WS_POPUP;
lstyle := lstyle or WS_CHILD;
setwindowlong(self.Handle, GWL_STYLE, lstyle);
//
Windows.SetParent(self.Handle, PHandle);
//-50是想在标题栏上方,但超出窗口范围,Windows就不绘制了啊
MoveWindow(self.Handle, 0, -50, 100, 100, true);
end;
end;