Thema: Delphi Exe auf eigenem Panel

Einzelnen Beitrag anzeigen

hanspeter

Registriert seit: 26. Jul 2003
Ort: Leipzig
1.350 Beiträge
 
Delphi XE2 Professional
 
#2

Re: Exe auf eigenem Panel

  Alt 24. Mär 2009, 10:46
Interessant,
wenn ich den Parent in der Kommandozeile übergebe und die gleiche Sequenz auf der Plugin-Seite
abarbeite, dann geht es.

Jetzt auf der Clientseite.

Delphi-Quellcode:
procedure SetClientParent(wnd, Parent: THandle);
var
  WPM : TWindowPlacement;
  w,h : integer;
begin
  Windows.SetParent(wnd, Parent);
  SetWindowLong(wnd,GWL_STYLE,(GetWindowLong(wnd,GWL_STYLE) AND NOT WS_CAPTION) or WS_CHILD);
  WPM.Length:=SizeOf(WPM);
  GetWindowPlacement(Parent,@WPM);
  w := wpm.rcNormalPosition.right - wpm.rcNormalPosition.left;
  h := wpm.rcNormalPosition.bottom - wpm.rcNormalPosition.top;
  WPM.ShowCmd:=SW_ShowMaximized;
  WPM.rcNormalPosition:=Classes.Rect(0,0,w,h);
  SetWindowPlacement(wnd,@WPM);
end;
  Mit Zitat antworten Zitat