Einzelnen Beitrag anzeigen

teebee

Registriert seit: 17. Jan 2003
Ort: Köln
460 Beiträge
 
Delphi 6 Professional
 
#5

Re: Externes Programm in Panel laufen lassen

  Alt 25. Aug 2005, 15:23
So wie es aussieht, ist das eigentliche Problem nicht das Fensterhandle des erzeugten Prozesses, sonst bliebe der ja unsichtbar. Irgendwie scheint Panel.Handle Null zu sein, dann ist der Parent automatisch der Desktop. Wie das jetzt aber mit dem sleep zusammenhängt ist mir leider nicht klar.
Laut PSDK soll man übrigens noch den Fensterstil WS_CHILD des untergeordneten Fensters setzen und WS_POPUP löschen, bevor man SetParent aufruft, wenn der Parent nicht Null ist
Zitat von MSDN:
For compatibility reasons, SetParent does not modify the WS_CHILD or WS_POPUP window styles of the window whose parent is being changed. Therefore, if hWndNewParent is NULL, you should also clear the WS_CHILD bit and set the WS_POPUP style after calling SetParent. Conversely, if hWndNewParent is not NULL and the window was previously a child of the desktop, you should clear the WS_POPUP style and set the WS_CHILD style before calling SetParent.
Gruß, teebee
  Mit Zitat antworten Zitat